From ac3aa4971afc084f341013602fc486a415431697 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 8 Mar 2009 09:45:11 +0000 Subject: [PATCH] Move hash_fwd into the hash subdirectory. I should have done this in the last release. But now all of the hash implementation is in the hash subdirectory. [SVN r51645] --- include/boost/functional/hash/hash.hpp | 2 +- include/boost/functional/hash/hash_fwd.hpp | 40 ++++++++++++++++++++++ include/boost/functional/hash_fwd.hpp | 31 +---------------- 3 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 include/boost/functional/hash/hash_fwd.hpp diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index b789ad6..8cd5a60 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -10,7 +10,7 @@ #if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) #define BOOST_FUNCTIONAL_HASH_HASH_HPP -#include +#include #include #include #include diff --git a/include/boost/functional/hash/hash_fwd.hpp b/include/boost/functional/hash/hash_fwd.hpp new file mode 100644 index 0000000..8b7d8e5 --- /dev/null +++ b/include/boost/functional/hash/hash_fwd.hpp @@ -0,0 +1,40 @@ + +// Copyright 2005-2008 Daniel James. +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Based on Peter Dimov's proposal +// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf +// issue 6.18. + +#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) +#define BOOST_FUNCTIONAL_HASH_FWD_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + template struct hash; + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + template void hash_combine(std::size_t& seed, T& v); +#else + template void hash_combine(std::size_t& seed, T const& v); +#endif + + template std::size_t hash_range(It, It); + template void hash_range(std::size_t&, It, It); + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) + template inline std::size_t hash_range(T*, T*); + template inline void hash_range(std::size_t&, T*, T*); +#endif +} + +#endif diff --git a/include/boost/functional/hash_fwd.hpp b/include/boost/functional/hash_fwd.hpp index 8b7d8e5..51b8d09 100644 --- a/include/boost/functional/hash_fwd.hpp +++ b/include/boost/functional/hash_fwd.hpp @@ -7,34 +7,5 @@ // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. -#if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) -#define BOOST_FUNCTIONAL_HASH_FWD_HPP +#include -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include -#include -#include - -namespace boost -{ - template struct hash; - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template void hash_combine(std::size_t& seed, T& v); -#else - template void hash_combine(std::size_t& seed, T const& v); -#endif - - template std::size_t hash_range(It, It); - template void hash_range(std::size_t&, It, It); - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) - template inline std::size_t hash_range(T*, T*); - template inline void hash_range(std::size_t&, T*, T*); -#endif -} - -#endif