Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
| 2 | // Copyright 2005-2009 Daniel James. |
| 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 5 | |
| 6 | // Based on Peter Dimov's proposal |
| 7 | // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf |
| 8 | // issue 6.18. |
| 9 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 10 | #if !defined(NDNBOOST_FUNCTIONAL_HASH_FWD_HPP) |
| 11 | #define NDNBOOST_FUNCTIONAL_HASH_FWD_HPP |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 12 | |
| 13 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) |
| 14 | # pragma once |
| 15 | #endif |
| 16 | |
| 17 | #include <ndnboost/config.hpp> |
| 18 | #include <cstddef> |
| 19 | #include <ndnboost/detail/workaround.hpp> |
| 20 | |
| 21 | namespace ndnboost |
| 22 | { |
| 23 | template <class T> struct hash; |
| 24 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 25 | #if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, < 1300) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 26 | template <class T> void hash_combine(std::size_t& seed, T& v); |
| 27 | #else |
| 28 | template <class T> void hash_combine(std::size_t& seed, T const& v); |
| 29 | #endif |
| 30 | |
| 31 | template <class It> std::size_t hash_range(It, It); |
| 32 | template <class It> void hash_range(std::size_t&, It, It); |
| 33 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 34 | #if NDNBOOST_WORKAROUND(__BORLANDC__, NDNBOOST_TESTED_AT(0x551)) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 35 | template <class T> inline std::size_t hash_range(T*, T*); |
| 36 | template <class T> inline void hash_range(std::size_t&, T*, T*); |
| 37 | #endif |
| 38 | } |
| 39 | |
| 40 | #endif |