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)
6 #if !defined(BOOST_UNORDERED_TEST_HELPERS_METAFUNCTIONS_HEADER)
7 #define BOOST_UNORDERED_TEST_HELPERS_METAFUNCTIONS_HEADER
9 #include <boost/config.hpp>
10 #include <boost/type_traits/is_same.hpp>
13 template <class Container>
14 struct is_set : public boost::is_same<typename Container::key_type,
15 typename Container::value_type>
19 template <class Container> struct has_unique_keys
21 static char flip(typename Container::iterator const&);
22 static long flip(std::pair<typename Container::iterator, bool> const&);
23 BOOST_STATIC_CONSTANT(bool,
24 value = sizeof(long) ==
26 ((Container*)0)->insert(*(typename Container::value_type*)0))));