summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorgregorycu <gregory.currie@gmail.com>2016-10-08 23:58:47 +1100
committerNer'zhul <nerzhul@users.noreply.github.com>2016-10-08 15:05:36 +0200
commit3de9ae4e6054bb420bea8ad5621a0b76552a3621 (patch)
treea06857aa18fe246fbf53181b3a0ce853855956d8 /src/util
parentad163ee5c3f7d6ca31e0add052fb76466a9bfcc8 (diff)
downloadminetest-3de9ae4e6054bb420bea8ad5621a0b76552a3621.tar.gz
minetest-3de9ae4e6054bb420bea8ad5621a0b76552a3621.tar.bz2
minetest-3de9ae4e6054bb420bea8ad5621a0b76552a3621.zip
Ensure std::unordered_ will be used on supported MSVC compilers
Diffstat (limited to 'src/util')
-rw-r--r--src/util/cpp11_container.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/cpp11_container.h b/src/util/cpp11_container.h
index f839be19a..7ac2fc371 100644
--- a/src/util/cpp11_container.h
+++ b/src/util/cpp11_container.h
@@ -21,6 +21,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define MT_CPP11CONTAINER_HEADER
#if __cplusplus >= 201103L
+#define USE_UNORDERED_CONTAINERS
+#endif
+
+#if _MSC_VER >= 1800
+#define USE_UNORDERED_CONTAINERS
+#endif
+
+#ifdef USE_UNORDERED_CONTAINERS
#include <unordered_map>
#include <unordered_set>
#define UNORDERED_MAP std::unordered_map