summaryrefslogtreecommitdiff
path: root/boost/type_index/stl_type_index.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_index/stl_type_index.hpp')
-rw-r--r--boost/type_index/stl_type_index.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/boost/type_index/stl_type_index.hpp b/boost/type_index/stl_type_index.hpp
index be28889962..dcc532d03b 100644
--- a/boost/type_index/stl_type_index.hpp
+++ b/boost/type_index/stl_type_index.hpp
@@ -40,6 +40,12 @@
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
+#if !((defined(_MSC_VER) && _MSC_VER > 1600) \
+ || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
+ || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103 ))
+# include <boost/functional/hash.hpp>
+#endif
+
#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
|| (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
# include <boost/type_traits/is_signed.hpp>
@@ -174,7 +180,9 @@ inline std::string stl_type_index::pretty_name() const {
inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT {
-#if (defined(_MSC_VER) && _MSC_VER > 1600) || (__GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__))
+#if (defined(_MSC_VER) && _MSC_VER > 1600) \
+ || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
+ || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103)
return data_->hash_code();
#else
return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name()));