]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/functional/hash/test/link_ext_test.cpp
2 // Copyright 2006-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)
6 #include "./config.hpp"
8 #define BOOST_HASH_TEST_NAMESPACE boost
9 #include <boost/functional/hash.hpp>
10 #include <boost/detail/lightweight_test.hpp>
13 int f(std::size_t hash1
, int* x1
) {
15 // Check that BOOST_HASH_TEST_NAMESPACE::hash<int*> works in both files.
16 BOOST_HASH_TEST_NAMESPACE::hash
<int*> ptr_hasher
;
17 BOOST_TEST(hash1
== ptr_hasher(x1
));
19 #if defined(BOOST_HASH_TEST_EXTENSIONS)
21 // Check that std::vector<std::size_t> is avaiable in this file.
22 std::vector
<std::size_t> x
;
23 x
.push_back(static_cast<std::size_t>(*x1
));
24 BOOST_HASH_TEST_NAMESPACE::hash
<std::vector
<std::size_t> > vector_hasher
;
25 return vector_hasher(x
) != BOOST_HASH_TEST_NAMESPACE::hash_value(x
);