Ensure std::unordered_ will be used on supported MSVC compilers
authorgregorycu <gregory.currie@gmail.com>
Sat, 8 Oct 2016 12:58:47 +0000 (23:58 +1100)
committerNer'zhul <nerzhul@users.noreply.github.com>
Sat, 8 Oct 2016 13:05:36 +0000 (15:05 +0200)
src/util/cpp11_container.h

index f839be19a44e64cf942a1ad91ed8ca1ed1b66149..7ac2fc371907de6c064e95517ef3d8e4f9f9756c 100644 (file)
@@ -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