summaryrefslogtreecommitdiff
path: root/boost/type_index/type_index_facade.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_index/type_index_facade.hpp')
-rw-r--r--boost/type_index/type_index_facade.hpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/boost/type_index/type_index_facade.hpp b/boost/type_index/type_index_facade.hpp
index c18ea4bada..931dedca25 100644
--- a/boost/type_index/type_index_facade.hpp
+++ b/boost/type_index/type_index_facade.hpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) Antony Polukhin, 2013-2014.
+// Copyright (c) Antony Polukhin, 2013-2015.
//
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -10,7 +10,6 @@
#define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP
#include <boost/config.hpp>
-#include <boost/functional/hash_fwd.hpp>
#include <string>
#include <cstring>
@@ -26,6 +25,11 @@
# pragma once
#endif
+// Forward declaration from #include <boost/functional/hash_fwd.hpp>
+namespace boost {
+ template <class It> std::size_t hash_range(It, It);
+}
+
namespace boost { namespace typeindex {
/// \class type_index_facade
@@ -101,8 +105,8 @@ public:
/// \return Hash code of a type. By default hashes types by raw_name().
/// \note <boost/functional/hash.hpp> has to be included if this function is used.
inline std::size_t hash_code() const BOOST_NOEXCEPT {
- const char* const name = derived().raw_name();
- return boost::hash_range(name, name + std::strlen(name));
+ const char* const name_raw = derived().raw_name();
+ return boost::hash_range(name_raw, name_raw + std::strlen(name_raw));
}
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)