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 #if !defined(BOOST_UNORDERED_TEST_HELPERS_HEADER)
7 #define BOOST_UNORDERED_TEST_HELPERS_HEADER
11 template <class Container>
14 typedef BOOST_DEDUCED_TYPENAME Container::key_type key_type;
16 static key_type const& get_key(key_type const& x)
22 static key_type const& get_key(
23 std::pair<key_type, T> const& x, char = 0)
29 static key_type const& get_key(std::pair<key_type const, T> const& x,
36 template <class Container, class T>
37 inline BOOST_DEDUCED_TYPENAME Container::key_type const& get_key(T const& x)
39 return get_key_impl<Container>::get_key(x);
44 // Increments an iterator by 1 or a given value.
45 // Like boost::next, but simpler and slower.
47 template <typename Iterator>
48 Iterator next(Iterator it)
53 template <typename Iterator, typename IntType>
54 Iterator next(Iterator it, IntType x)