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>
14 template <class Container>
16 : public boost::is_same<
17 BOOST_DEDUCED_TYPENAME Container::key_type,
18 BOOST_DEDUCED_TYPENAME Container::value_type> {};
20 template <class Container>
21 struct has_unique_keys
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))