RCS file: /cvsroot/boost/boost/boost/functional/hash/hash.hpp,v
retrieving revision 1.27.2.7
diff -u -r1.27.2.7 hash.hpp
|
|
|
1 | 1 | |
2 | | // Copyright Daniel James 2005-2006. Use, modification, and distribution are |
| 2 | // Copyright Daniel James 2005-2007. Use, modification, and distribution are |
3 | 3 | // subject to the Boost Software License, Version 1.0. (See accompanying |
4 | 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
5 | 5 | |
… |
… |
|
28 | 28 | #include <boost/type_traits/is_const.hpp> |
29 | 29 | #endif |
30 | 30 | |
| 31 | #if defined(BOOST_MSVC) |
| 32 | # pragma warning(push) |
| 33 | # pragma warning(disable:4267) |
| 34 | #endif |
| 35 | |
31 | 36 | namespace boost |
32 | 37 | { |
33 | 38 | #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) |
… |
… |
|
41 | 46 | std::size_t hash_value(long); |
42 | 47 | std::size_t hash_value(unsigned long); |
43 | 48 | |
44 | | #if defined(BOOST_MSVC) && defined(_WIN64) |
| 49 | #if BOOST_HAS_LONG_LONG && defined(_M_X64) && defined(_WIN64) |
45 | 50 | // On 64-bit windows std::size_t is a typedef for unsigned long long, which |
46 | 51 | // isn't due to be supported until Boost 1.35. So add support here. |
47 | 52 | // (Technically, Boost.Hash isn't actually documented as supporting |
48 | 53 | // std::size_t. But it would be pretty silly not to). |
49 | | std::size_t hash_value(std::size_t); |
| 54 | std::size_t hash_value(long long); |
| 55 | std::size_t hash_value(unsigned long long); |
50 | 56 | #endif |
51 | 57 | |
52 | 58 | #if !BOOST_WORKAROUND(__DMC__, <= 0x848) |
… |
… |
|
116 | 122 | return static_cast<std::size_t>(v); |
117 | 123 | } |
118 | 124 | |
119 | | #if defined(_M_X64) && defined(_WIN64) |
| 125 | #if BOOST_HAS_LONG_LONG && defined(_M_X64) && defined(_WIN64) |
120 | 126 | inline std::size_t hash_value(long long v) |
121 | 127 | { |
122 | 128 | return v; |
… |
… |
|
588 | 594 | #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION |
589 | 595 | } |
590 | 596 | |
| 597 | #if defined(BOOST_MSVC) |
| 598 | # pragma warning(pop) |
| 599 | #endif |
| 600 | |
591 | 601 | #endif |
592 | 602 | |