]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/functional/hash/test/hash_no_ext_macro_1.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / functional / hash / test / hash_no_ext_macro_1.cpp
1
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)
5
6 #include "./config.hpp"
7
8 #if defined(BOOST_HASH_TEST_EXTENSIONS)
9
10 // Include header without BOOST_HASH_NO_EXTENSIONS defined
11 # if defined(BOOST_HASH_NO_EXTENSIONS)
12 # undef BOOST_HASH_NO_EXTENSIONS
13 # endif
14 # include <boost/functional/hash.hpp>
15
16 // Include header with BOOST_HASH_NO_EXTENSIONS defined
17 # define BOOST_HASH_NO_EXTENSIONS
18 # include <boost/functional/hash.hpp>
19 #endif
20
21 #include <boost/detail/lightweight_test.hpp>
22 #include <deque>
23
24 int main()
25 {
26 #if defined(BOOST_HASH_TEST_EXTENSIONS)
27 std::deque<int> x;
28
29 x.push_back(1);
30 x.push_back(2);
31
32 BOOST_HASH_TEST_NAMESPACE::hash<std::deque<int> > hasher;
33 BOOST_TEST(hasher(x) == BOOST_HASH_TEST_NAMESPACE::hash_value(x));
34 #endif
35
36 return boost::report_errors();
37 }