]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/unordered/test/helpers/metafunctions.hpp
8e36549da582c3bf106b135867f8234b0099b8f6
[ceph.git] / ceph / src / boost / libs / unordered / test / helpers / metafunctions.hpp
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 #if !defined(BOOST_UNORDERED_TEST_HELPERS_METAFUNCTIONS_HEADER)
7 #define BOOST_UNORDERED_TEST_HELPERS_METAFUNCTIONS_HEADER
8
9 #include <boost/config.hpp>
10 #include <boost/type_traits/is_same.hpp>
11
12 namespace test
13 {
14 template <class Container>
15 struct is_set
16 : public boost::is_same<
17 BOOST_DEDUCED_TYPENAME Container::key_type,
18 BOOST_DEDUCED_TYPENAME Container::value_type> {};
19
20 template <class Container>
21 struct has_unique_keys
22 {
23 static char flip(BOOST_DEDUCED_TYPENAME Container::iterator const&);
24 static long flip(std::pair<BOOST_DEDUCED_TYPENAME Container::iterator, bool> const&);
25 BOOST_STATIC_CONSTANT(bool, value = sizeof(long) == sizeof(
26 flip(((Container*) 0)->insert(*(BOOST_DEDUCED_TYPENAME Container::value_type*) 0))
27 ));
28 };
29 }
30
31 #endif
32