diff options
Diffstat (limited to 'src/tr1_hash_map.h')
| -rw-r--r-- | src/tr1_hash_map.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tr1_hash_map.h b/src/tr1_hash_map.h new file mode 100644 index 0000000..3f31576 --- /dev/null +++ b/src/tr1_hash_map.h @@ -0,0 +1,19 @@ +#pragma once + +// detection and fallback for unordered_map in C++0x +#ifdef __cplusplus + #ifdef __GNUC__ + #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 + #include <unordered_map> + #define tr1_hash_map std::unordered_map + #else + #include <map> + #define tr1_hash_map std::map + #endif + #else + #include <map> + #define tr1_hash_map std::map + #endif +#endif + + |
