diff --git a/test/exception/assign_exception_tests.cpp b/test/exception/assign_exception_tests.cpp index 05f22fa7..c62bf8ab 100644 --- a/test/exception/assign_exception_tests.cpp +++ b/test/exception/assign_exception_tests.cpp @@ -54,9 +54,9 @@ template struct assign_base : public test::exception_base test::random_values x_values, y_values; T x, y; - typedef BOOST_DEDUCED_TYPENAME T::hasher hasher; - typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal; - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typedef typename T::hasher hasher; + typedef typename T::key_equal key_equal; + typedef typename T::allocator_type allocator_type; assign_base(int tag1, int tag2, float mlf1 = 1.0, float mlf2 = 1.0) : x_values(), y_values(), diff --git a/test/exception/constructor_exception_tests.cpp b/test/exception/constructor_exception_tests.cpp index d480accd..3dfebcef 100644 --- a/test/exception/constructor_exception_tests.cpp +++ b/test/exception/constructor_exception_tests.cpp @@ -172,9 +172,9 @@ template struct input_range_construct_test : public range, objects void run() const { - BOOST_DEDUCED_TYPENAME test::random_values::const_iterator - begin = this->values.begin(), - end = this->values.end(); + typename test::random_values::const_iterator begin = + this->values.begin(), + end = this->values.end(); T x(test::input_iterator(begin), test::input_iterator(end), 0, hash, equal_to, allocator); diff --git a/test/exception/erase_exception_tests.cpp b/test/exception/erase_exception_tests.cpp index dcd2dbd5..0f2c1eb6 100644 --- a/test/exception/erase_exception_tests.cpp +++ b/test/exception/erase_exception_tests.cpp @@ -38,8 +38,7 @@ template struct erase_by_key_test1 : public erase_test_base { void run(T& x) const { - typedef BOOST_DEDUCED_TYPENAME test::random_values::const_iterator - iterator; + typedef typename test::random_values::const_iterator iterator; for (iterator it = this->values.begin(), end = this->values.end(); it != end; ++it) { diff --git a/test/exception/insert_exception_tests.cpp b/test/exception/insert_exception_tests.cpp index 1043a3fb..79074c5e 100644 --- a/test/exception/insert_exception_tests.cpp +++ b/test/exception/insert_exception_tests.cpp @@ -18,7 +18,7 @@ test::seed_t initialize_seed(747373); template void rehash_prep(T& x) { using namespace std; - typedef BOOST_DEDUCED_TYPENAME T::size_type size_type; + typedef typename T::size_type size_type; x.max_load_factor(0.25); size_type bucket_count = x.bucket_count(); diff --git a/test/exception/move_assign_exception_tests.cpp b/test/exception/move_assign_exception_tests.cpp index b81bfe36..6beb6820 100644 --- a/test/exception/move_assign_exception_tests.cpp +++ b/test/exception/move_assign_exception_tests.cpp @@ -21,9 +21,9 @@ template struct move_assign_base : public test::exception_base test::random_values x_values, y_values; T x, y; - typedef BOOST_DEDUCED_TYPENAME T::hasher hasher; - typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal; - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typedef typename T::hasher hasher; + typedef typename T::key_equal key_equal; + typedef typename T::allocator_type allocator_type; move_assign_base(int tag1, int tag2, float mlf1 = 1.0, float mlf2 = 1.0) : x_values(), y_values(), diff --git a/test/exception/swap_exception_tests.cpp b/test/exception/swap_exception_tests.cpp index b2bec836..1569e814 100644 --- a/test/exception/swap_exception_tests.cpp +++ b/test/exception/swap_exception_tests.cpp @@ -60,9 +60,9 @@ template struct swap_base : public test::exception_base const test::random_values x_values, y_values; const T initial_x, initial_y; - typedef BOOST_DEDUCED_TYPENAME T::hasher hasher; - typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal; - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typedef typename T::hasher hasher; + typedef typename T::key_equal key_equal; + typedef typename T::allocator_type allocator_type; swap_base(unsigned int count1, unsigned int count2, int tag1, int tag2) : x_values(count1, test::limited_range), diff --git a/test/helpers/equivalent.hpp b/test/helpers/equivalent.hpp index 5c1bfa82..bd27d8df 100644 --- a/test/helpers/equivalent.hpp +++ b/test/helpers/equivalent.hpp @@ -58,12 +58,12 @@ namespace test { template class unordered_equivalence_tester { - BOOST_DEDUCED_TYPENAME Container::size_type size_; - BOOST_DEDUCED_TYPENAME Container::hasher hasher_; - BOOST_DEDUCED_TYPENAME Container::key_equal key_equal_; + typename Container::size_type size_; + typename Container::hasher hasher_; + typename Container::key_equal key_equal_; float max_load_factor_; - typedef test::list value_list; + typedef test::list value_list; value_list values_; public: diff --git a/test/helpers/exception_test.hpp b/test/helpers/exception_test.hpp index d5272691..8984eee9 100644 --- a/test/helpers/exception_test.hpp +++ b/test/helpers/exception_test.hpp @@ -176,21 +176,18 @@ namespace test { DISABLE_EXCEPTIONS; test::check_instances check; test::scope = ""; - BOOST_DEDUCED_TYPENAME Test::data_type x(test_.init()); - BOOST_DEDUCED_TYPENAME Test::strong_type strong; + typename Test::data_type x(test_.init()); + typename Test::strong_type strong; strong.store(x); try { ENABLE_EXCEPTIONS; - call_ignore_extra_parameters( - &Test::run, test_, x, strong); + call_ignore_extra_parameters(&Test::run, test_, x, strong); } catch (...) { try { DISABLE_EXCEPTIONS; - call_ignore_extra_parameters( + call_ignore_extra_parameters( &Test::check, test_, constant(x), constant(strong)); } catch (...) { exception_in_check_ = true; diff --git a/test/helpers/helpers.hpp b/test/helpers/helpers.hpp index 854ebfc7..146dea4d 100644 --- a/test/helpers/helpers.hpp +++ b/test/helpers/helpers.hpp @@ -11,7 +11,7 @@ namespace test { template struct get_key_impl { - typedef BOOST_DEDUCED_TYPENAME Container::key_type key_type; + typedef typename Container::key_type key_type; static key_type const& get_key(key_type const& x) { return x; } @@ -30,7 +30,7 @@ namespace test { }; template - inline BOOST_DEDUCED_TYPENAME Container::key_type const& get_key(T const& x) + inline typename Container::key_type const& get_key(T const& x) { return get_key_impl::get_key(x); } diff --git a/test/helpers/input_iterator.hpp b/test/helpers/input_iterator.hpp index ab1a818b..7a938a50 100644 --- a/test/helpers/input_iterator.hpp +++ b/test/helpers/input_iterator.hpp @@ -12,7 +12,7 @@ namespace test { template struct proxy { - typedef BOOST_DEDUCED_TYPENAME Iterator::value_type value_type; + typedef typename Iterator::value_type value_type; explicit proxy(value_type const& v) : v_(v) {} proxy(proxy const& x) : v_(x.v_) {} @@ -26,10 +26,8 @@ namespace test { template struct input_iterator_adaptor { - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type - value_type; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer - pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef typename std::iterator_traits::pointer pointer; typedef proxy reference; typedef std::ptrdiff_t difference_type; typedef std::input_iterator_tag iterator_category; @@ -66,14 +64,12 @@ namespace test { template struct copy_iterator_adaptor { - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type - value_type; - typedef BOOST_DEDUCED_TYPENAME - std::iterator_traits::difference_type difference_type; - typedef BOOST_DEDUCED_TYPENAME - std::iterator_traits::iterator_category iterator_category; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer - pointer; + typedef typename std::iterator_traits::value_type value_type; + typedef + typename std::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::iterator_category + iterator_category; + typedef typename std::iterator_traits::pointer pointer; typedef proxy reference; copy_iterator_adaptor() : base_() {} diff --git a/test/helpers/invariants.hpp b/test/helpers/invariants.hpp index 92012c84..a555da60 100644 --- a/test/helpers/invariants.hpp +++ b/test/helpers/invariants.hpp @@ -24,12 +24,12 @@ namespace test { template void check_equivalent_keys(X const& x1) { - BOOST_DEDUCED_TYPENAME X::key_equal eq = x1.key_eq(); - typedef BOOST_DEDUCED_TYPENAME X::key_type key_type; + typename X::key_equal eq = x1.key_eq(); + typedef typename X::key_type key_type; std::set > found_; - BOOST_DEDUCED_TYPENAME X::const_iterator it = x1.begin(), end = x1.end(); - BOOST_DEDUCED_TYPENAME X::size_type size = 0; + typename X::const_iterator it = x1.begin(), end = x1.end(); + typename X::size_type size = 0; while (it != end) { // First test that the current key has not occurred before, required // to test either that keys are unique or that equivalent keys are @@ -60,9 +60,9 @@ namespace test { // Check that the keys are in the correct bucket and are // adjacent in the bucket. - BOOST_DEDUCED_TYPENAME X::size_type bucket = x1.bucket(key); - BOOST_DEDUCED_TYPENAME X::const_local_iterator lit = x1.begin(bucket), - lend = x1.end(bucket); + typename X::size_type bucket = x1.bucket(key); + typename X::const_local_iterator lit = x1.begin(bucket), + lend = x1.end(bucket); unsigned int count_checked = 0; for (; lit != lend && !eq(get_key(*lit), key); ++lit) { @@ -106,12 +106,11 @@ namespace test { // Check that size in the buckets matches up. - BOOST_DEDUCED_TYPENAME X::size_type bucket_size = 0; + typename X::size_type bucket_size = 0; - for (BOOST_DEDUCED_TYPENAME X::size_type i = 0; i < x1.bucket_count(); - ++i) { - for (BOOST_DEDUCED_TYPENAME X::const_local_iterator begin2 = x1.begin(i), - end2 = x1.end(i); + for (typename X::size_type i = 0; i < x1.bucket_count(); ++i) { + for (typename X::const_local_iterator begin2 = x1.begin(i), + end2 = x1.end(i); begin2 != end2; ++begin2) { ++bucket_size; } diff --git a/test/helpers/metafunctions.hpp b/test/helpers/metafunctions.hpp index 0442920e..f5f13851 100644 --- a/test/helpers/metafunctions.hpp +++ b/test/helpers/metafunctions.hpp @@ -11,23 +11,19 @@ namespace test { template - struct is_set - : public boost::is_same + struct is_set : public boost::is_same { }; template struct has_unique_keys { - static char flip(BOOST_DEDUCED_TYPENAME Container::iterator const&); - static long flip( - std::pair const&); + static char flip(typename Container::iterator const&); + static long flip(std::pair const&); BOOST_STATIC_CONSTANT(bool, value = sizeof(long) == - sizeof( - flip(((Container*)0) - ->insert( - *(BOOST_DEDUCED_TYPENAME Container::value_type*)0)))); + sizeof(flip( + ((Container*)0)->insert(*(typename Container::value_type*)0)))); }; } diff --git a/test/helpers/random_values.hpp b/test/helpers/random_values.hpp index 912b8be0..d139d180 100644 --- a/test/helpers/random_values.hpp +++ b/test/helpers/random_values.hpp @@ -15,7 +15,7 @@ namespace test { template struct unordered_generator_set { - typedef BOOST_DEDUCED_TYPENAME X::value_type value_type; + typedef typename X::value_type value_type; random_generator type_; @@ -41,8 +41,8 @@ namespace test { template struct unordered_generator_map { - typedef BOOST_DEDUCED_TYPENAME X::key_type key_type; - typedef BOOST_DEDUCED_TYPENAME X::mapped_type mapped_type; + typedef typename X::key_type key_type; + typedef typename X::mapped_type mapped_type; random_generator type_; @@ -78,7 +78,7 @@ namespace test { template struct unordered_generator : public unordered_generator_base::type { - typedef BOOST_DEDUCED_TYPENAME unordered_generator_base::type base; + typedef typename unordered_generator_base::type base; unordered_generator(random_generator const& type = default_generator) : base(type) @@ -87,7 +87,7 @@ namespace test { }; template - struct random_values : public test::list + struct random_values : public test::list { random_values() {} diff --git a/test/helpers/strong.hpp b/test/helpers/strong.hpp index 040c18b4..3c936133 100644 --- a/test/helpers/strong.hpp +++ b/test/helpers/strong.hpp @@ -15,7 +15,7 @@ namespace test { template class strong { - typedef test::list values_type; + typedef test::list values_type; values_type values_; unsigned int allocations_; diff --git a/test/helpers/tracker.hpp b/test/helpers/tracker.hpp index f385cd8a..0f86ba6f 100644 --- a/test/helpers/tracker.hpp +++ b/test/helpers/tracker.hpp @@ -22,7 +22,7 @@ namespace test { template struct equals_to_compare { - typedef std::less type; + typedef std::less type; }; template <> struct equals_to_compare @@ -32,7 +32,7 @@ namespace test { template void compare_range(X1 const& x1, X2 const& x2) { - typedef test::list value_list; + typedef test::list value_list; value_list values1(x1.begin(), x1.end()); value_list values2(x2.begin(), x2.end()); values1.sort(); @@ -60,44 +60,38 @@ namespace test { template struct ordered_base { - typedef std::set::type> + typedef std::set::type> type; }; template struct ordered_base { - typedef std::multiset::type> + typedef std::multiset::type> type; }; template struct ordered_base { - typedef std::map::type> + typedef std::map::type> type; }; template struct ordered_base { - typedef std::multimap::type> + typedef std::multimap::type> type; }; template class ordered : public ordered_base::type { - typedef BOOST_DEDUCED_TYPENAME ordered_base::type base; + typedef typename ordered_base::type base; public: - typedef BOOST_DEDUCED_TYPENAME base::key_compare key_compare; + typedef typename base::key_compare key_compare; ordered() : base() {} @@ -105,12 +99,10 @@ namespace test { void compare(X const& x) { compare_range(x, *this); } - void compare_key( - X const& x, BOOST_DEDUCED_TYPENAME X::value_type const& val) + void compare_key(X const& x, typename X::value_type const& val) { compare_pairs(x.equal_range(get_key(val)), - this->equal_range(get_key(val)), - (BOOST_DEDUCED_TYPENAME X::value_type*)0); + this->equal_range(get_key(val)), (typename X::value_type*)0); } template void insert_range(It b, It e) @@ -123,10 +115,9 @@ namespace test { }; template - BOOST_DEDUCED_TYPENAME equals_to_compare::type create_compare( - Equals const&) + typename equals_to_compare::type create_compare(Equals const&) { - BOOST_DEDUCED_TYPENAME equals_to_compare::type x; + typename equals_to_compare::type x; return x; } diff --git a/test/unordered/assign_tests.cpp b/test/unordered/assign_tests.cpp index e3c2b9b3..f3d633b0 100644 --- a/test/unordered/assign_tests.cpp +++ b/test/unordered/assign_tests.cpp @@ -27,8 +27,8 @@ namespace assign_tests { template void assign_tests1(T*, test::random_generator generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf; - BOOST_DEDUCED_TYPENAME T::key_equal eq; + typename T::hasher hf; + typename T::key_equal eq; BOOST_LIGHTWEIGHT_TEST_OSTREAM << "assign_tests1.1\n"; { @@ -68,14 +68,14 @@ namespace assign_tests { template void assign_tests2(T*, test::random_generator generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf1(1); - BOOST_DEDUCED_TYPENAME T::hasher hf2(2); - BOOST_DEDUCED_TYPENAME T::key_equal eq1(1); - BOOST_DEDUCED_TYPENAME T::key_equal eq2(2); - BOOST_DEDUCED_TYPENAME T::allocator_type al1(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al2(2); + typename T::hasher hf1(1); + typename T::hasher hf2(2); + typename T::key_equal eq1(1); + typename T::key_equal eq2(2); + typename T::allocator_type al1(1); + typename T::allocator_type al2(2); - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typedef typename T::allocator_type allocator_type; BOOST_LIGHTWEIGHT_TEST_OSTREAM << "assign_tests2.0 - empty container\n"; { diff --git a/test/unordered/bucket_tests.cpp b/test/unordered/bucket_tests.cpp index 60a48887..c314d2c5 100644 --- a/test/unordered/bucket_tests.cpp +++ b/test/unordered/bucket_tests.cpp @@ -29,8 +29,8 @@ namespace bucket_tests { { test::check_instances check_; - typedef BOOST_DEDUCED_TYPENAME X::size_type size_type; - typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator; + typedef typename X::size_type size_type; + typedef typename X::const_local_iterator const_local_iterator; test::random_values v(1000, generator); X x(v.begin(), v.end()); @@ -41,9 +41,8 @@ namespace bucket_tests { << "<=" << x.max_bucket_count() << "\n"; } - for (BOOST_DEDUCED_TYPENAME test::random_values::const_iterator - it = v.begin(), - end = v.end(); + for (typename test::random_values::const_iterator it = v.begin(), + end = v.end(); it != end; ++it) { size_type bucket = x.bucket(test::get_key(*it)); diff --git a/test/unordered/compile_tests.hpp b/test/unordered/compile_tests.hpp index 691e4413..bb5256f8 100644 --- a/test/unordered/compile_tests.hpp +++ b/test/unordered/compile_tests.hpp @@ -52,27 +52,27 @@ template int implicit_construct() template void container_test(X& r, T const&) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::difference_type difference_type; - typedef BOOST_DEDUCED_TYPENAME X::size_type size_type; + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::difference_type difference_type; + typedef typename X::size_type size_type; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::value_type - iterator_value_type; - typedef BOOST_DEDUCED_TYPENAME - std::iterator_traits::value_type const_iterator_value_type; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type + typedef + typename std::iterator_traits::value_type iterator_value_type; + typedef typename std::iterator_traits::value_type + const_iterator_value_type; + typedef typename std::iterator_traits::difference_type iterator_difference_type; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_iterator>::difference_type const_iterator_difference_type; + typedef typename std::iterator_traits::difference_type + const_iterator_difference_type; - typedef BOOST_DEDUCED_TYPENAME X::value_type value_type; - typedef BOOST_DEDUCED_TYPENAME X::reference reference; - typedef BOOST_DEDUCED_TYPENAME X::const_reference const_reference; + typedef typename X::value_type value_type; + typedef typename X::reference reference; + typedef typename X::const_reference const_reference; - typedef BOOST_DEDUCED_TYPENAME X::node_type node_type; + typedef typename X::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename X::allocator_type allocator_type; // value_type @@ -97,8 +97,8 @@ template void container_test(X& r, T const&) // node_type - BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT(( + boost::is_same::value)); // difference_type @@ -208,9 +208,9 @@ template void container_test(X& r, T const&) template void unordered_destructible_test(X&) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::size_type size_type; + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::size_type size_type; X x1; @@ -247,31 +247,30 @@ template void unordered_destructible_test(X&) // Allocator - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename X::allocator_type allocator_type; test::check_return_type::equals(a_const.get_allocator()); } template void unordered_set_test(X& r, Key const&) { - typedef BOOST_DEDUCED_TYPENAME X::value_type value_type; - typedef BOOST_DEDUCED_TYPENAME X::key_type key_type; + typedef typename X::value_type value_type; + typedef typename X::key_type key_type; BOOST_STATIC_ASSERT((boost::is_same::value)); // iterator pointer / const_pointer_type - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::local_iterator local_iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer - iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::local_iterator local_iterator; + typedef typename X::const_local_iterator const_local_iterator; + typedef typename std::iterator_traits::pointer iterator_pointer; + typedef typename std::iterator_traits::pointer const_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer + typedef typename std::iterator_traits::pointer local_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_local_iterator>::pointer const_local_iterator_pointer; + typedef typename std::iterator_traits::pointer + const_local_iterator_pointer; BOOST_STATIC_ASSERT( (boost::is_same::value)); @@ -285,52 +284,43 @@ template void unordered_set_test(X& r, Key const&) // pointer_traits BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); + typename boost::pointer_traits::pointer>::value)); BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); - BOOST_STATIC_ASSERT(( - boost::is_same::difference_type>::value)); + typename boost::pointer_traits::element_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); // pointer_traits - BOOST_STATIC_ASSERT(( - boost::is_same::pointer>::value)); + BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); - BOOST_STATIC_ASSERT(( - boost::is_same::difference_type>::value)); + typename boost::pointer_traits::element_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); // pointer_traits - BOOST_STATIC_ASSERT(( - boost::is_same::pointer>::value)); + BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); - BOOST_STATIC_ASSERT(( - boost::is_same::difference_type>::value)); + typename boost::pointer_traits::element_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); // pointer_traits BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); + typename boost::pointer_traits::pointer>::value)); BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); + typename boost::pointer_traits::element_type>:: + value)); BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); + typename boost::pointer_traits::difference_type>:: + value)); - typedef BOOST_DEDUCED_TYPENAME X::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME node_type::value_type node_value_type; + typedef typename X::node_type node_type; + typedef typename node_type::value_type node_value_type; BOOST_STATIC_ASSERT((boost::is_same::value)); // Call node_type functions. @@ -345,26 +335,25 @@ template void unordered_set_test(X& r, Key const&) template void unordered_map_test(X& r, Key const& k, T const& v) { - typedef BOOST_DEDUCED_TYPENAME X::value_type value_type; - typedef BOOST_DEDUCED_TYPENAME X::key_type key_type; + typedef typename X::value_type value_type; + typedef typename X::key_type key_type; BOOST_STATIC_ASSERT( (boost::is_same >::value)); // iterator pointer / const_pointer_type - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::local_iterator local_iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer - iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::local_iterator local_iterator; + typedef typename X::const_local_iterator const_local_iterator; + typedef typename std::iterator_traits::pointer iterator_pointer; + typedef typename std::iterator_traits::pointer const_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer + typedef typename std::iterator_traits::pointer local_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_local_iterator>::pointer const_local_iterator_pointer; + typedef typename std::iterator_traits::pointer + const_local_iterator_pointer; BOOST_STATIC_ASSERT((boost::is_same::value)); BOOST_STATIC_ASSERT( @@ -377,53 +366,44 @@ void unordered_map_test(X& r, Key const& k, T const& v) // pointer_traits BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); - BOOST_STATIC_ASSERT( - (boost::is_same::element_type>::value)); - BOOST_STATIC_ASSERT(( - boost::is_same::difference_type>::value)); + typename boost::pointer_traits::pointer>::value)); + BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); // pointer_traits - BOOST_STATIC_ASSERT(( - boost::is_same::pointer>::value)); + BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); - BOOST_STATIC_ASSERT(( - boost::is_same::difference_type>::value)); + typename boost::pointer_traits::element_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); // pointer_traits - BOOST_STATIC_ASSERT(( - boost::is_same::pointer>::value)); - BOOST_STATIC_ASSERT( - (boost::is_same::element_type>::value)); - BOOST_STATIC_ASSERT(( - boost::is_same::difference_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); + BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); + BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); // pointer_traits BOOST_STATIC_ASSERT((boost::is_same::pointer>::value)); + typename boost::pointer_traits::pointer>::value)); BOOST_STATIC_ASSERT((boost::is_same::element_type>::value)); + typename boost::pointer_traits::element_type>:: + value)); BOOST_STATIC_ASSERT((boost::is_same::difference_type>::value)); + typename boost::pointer_traits::difference_type>:: + value)); - typedef BOOST_DEDUCED_TYPENAME X::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME node_type::key_type node_key_type; - typedef BOOST_DEDUCED_TYPENAME node_type::mapped_type node_mapped_type; + typedef typename X::node_type node_type; + typedef typename node_type::key_type node_key_type; + typedef typename node_type::mapped_type node_mapped_type; BOOST_STATIC_ASSERT((boost::is_same::value)); BOOST_STATIC_ASSERT((boost::is_same::value)); @@ -495,12 +475,12 @@ template void equality_test(X& r) template void unordered_unique_test(X& r, T const& t) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; test::check_return_type >::equals(r.insert(t)); test::check_return_type >::equals(r.emplace(t)); - typedef BOOST_DEDUCED_TYPENAME X::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME X::insert_return_type insert_return_type; + typedef typename X::node_type node_type; + typedef typename X::insert_return_type insert_return_type; // insert_return_type @@ -527,7 +507,7 @@ template void unordered_unique_test(X& r, T const& t) template void unordered_equivalent_test(X& r, T const& t) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; test::check_return_type::equals(r.insert(t)); test::check_return_type::equals(r.emplace(t)); } @@ -535,8 +515,8 @@ template void unordered_equivalent_test(X& r, T const& t) template void unordered_map_functions(X&, Key const& k, T const& v) { - typedef BOOST_DEDUCED_TYPENAME X::mapped_type mapped_type; - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::mapped_type mapped_type; + typedef typename X::iterator iterator; X a; test::check_return_type::equals_ref(a[k]); @@ -567,52 +547,50 @@ void unordered_test(X& x, Key& k, Hash& hf, Pred& eq) { unordered_destructible_test(x); - typedef BOOST_DEDUCED_TYPENAME X::key_type key_type; - typedef BOOST_DEDUCED_TYPENAME X::hasher hasher; - typedef BOOST_DEDUCED_TYPENAME X::key_equal key_equal; - typedef BOOST_DEDUCED_TYPENAME X::size_type size_type; + typedef typename X::key_type key_type; + typedef typename X::hasher hasher; + typedef typename X::key_equal key_equal; + typedef typename X::size_type size_type; - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::local_iterator local_iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_local_iterator const_local_iterator; + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::local_iterator local_iterator; + typedef typename X::const_local_iterator const_local_iterator; - typedef BOOST_DEDUCED_TYPENAME - std::iterator_traits::iterator_category iterator_category; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type + typedef typename std::iterator_traits::iterator_category + iterator_category; + typedef typename std::iterator_traits::difference_type iterator_difference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer - iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::reference - iterator_reference; + typedef typename std::iterator_traits::pointer iterator_pointer; + typedef typename std::iterator_traits::reference iterator_reference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - local_iterator>::iterator_category local_iterator_category; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - local_iterator>::difference_type local_iterator_difference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer + typedef typename std::iterator_traits::iterator_category + local_iterator_category; + typedef typename std::iterator_traits::difference_type + local_iterator_difference; + typedef typename std::iterator_traits::pointer local_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::reference + typedef typename std::iterator_traits::reference local_iterator_reference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_iterator>::iterator_category const_iterator_category; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_iterator>::difference_type const_iterator_difference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::pointer + typedef typename std::iterator_traits::iterator_category + const_iterator_category; + typedef typename std::iterator_traits::difference_type + const_iterator_difference; + typedef typename std::iterator_traits::pointer const_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::reference + typedef typename std::iterator_traits::reference const_iterator_reference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_local_iterator>::iterator_category const_local_iterator_category; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_local_iterator>::difference_type const_local_iterator_difference; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_local_iterator>::pointer const_local_iterator_pointer; - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits< - const_local_iterator>::reference const_local_iterator_reference; - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename std::iterator_traits::iterator_category + const_local_iterator_category; + typedef typename std::iterator_traits::difference_type + const_local_iterator_difference; + typedef typename std::iterator_traits::pointer + const_local_iterator_pointer; + typedef typename std::iterator_traits::reference + const_local_iterator_reference; + typedef typename X::allocator_type allocator_type; BOOST_STATIC_ASSERT((boost::is_same::value)); // boost::function_requires >(); @@ -731,15 +709,15 @@ void unordered_copyable_test(X& x, Key& k, T& t, Hash& hf, Pred& eq) { unordered_test(x, k, hf, eq); - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::allocator_type allocator_type; X a; allocator_type m = a.get_allocator(); - BOOST_DEDUCED_TYPENAME X::value_type* i = 0; - BOOST_DEDUCED_TYPENAME X::value_type* j = 0; + typename X::value_type* i = 0; + typename X::value_type* j = 0; // Constructors @@ -829,8 +807,8 @@ void unordered_copyable_test(X& x, Key& k, T& t, Hash& hf, Pred& eq) sink(a7a); sink(a9a); - typedef BOOST_DEDUCED_TYPENAME X::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename X::node_type node_type; + typedef typename X::allocator_type allocator_type; node_type const n_const = a.extract(a.begin()); test::check_return_type::equals(n_const.get_allocator()); } @@ -840,9 +818,9 @@ void unordered_movable_test(X& x, Key& k, T& /* t */, Hash& hf, Pred& eq) { unordered_test(x, k, hf, eq); - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename X::allocator_type allocator_type; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) X x1(rvalue_default()); diff --git a/test/unordered/constructor_tests.cpp b/test/unordered/constructor_tests.cpp index 8e615f90..5f571986 100644 --- a/test/unordered/constructor_tests.cpp +++ b/test/unordered/constructor_tests.cpp @@ -25,9 +25,9 @@ namespace constructor_tests { template void constructor_tests1(T*, test::random_generator generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf; - BOOST_DEDUCED_TYPENAME T::key_equal eq; - BOOST_DEDUCED_TYPENAME T::allocator_type al; + typename T::hasher hf; + typename T::key_equal eq; + typename T::allocator_type al; UNORDERED_SUB_TEST("Construct 1") { @@ -176,15 +176,15 @@ namespace constructor_tests { template void constructor_tests2(T*, test::random_generator const& generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf; - BOOST_DEDUCED_TYPENAME T::hasher hf1(1); - BOOST_DEDUCED_TYPENAME T::hasher hf2(2); - BOOST_DEDUCED_TYPENAME T::key_equal eq; - BOOST_DEDUCED_TYPENAME T::key_equal eq1(1); - BOOST_DEDUCED_TYPENAME T::key_equal eq2(2); - BOOST_DEDUCED_TYPENAME T::allocator_type al; - BOOST_DEDUCED_TYPENAME T::allocator_type al1(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al2(2); + typename T::hasher hf; + typename T::hasher hf1(1); + typename T::hasher hf2(2); + typename T::key_equal eq; + typename T::key_equal eq1(1); + typename T::key_equal eq2(2); + typename T::allocator_type al; + typename T::allocator_type al1(1); + typename T::allocator_type al2(2); UNORDERED_SUB_TEST("Construct 1") { @@ -274,14 +274,11 @@ namespace constructor_tests { { test::check_instances check_; test::random_values v(100, generator); - BOOST_DEDUCED_TYPENAME test::random_values::const_iterator v_begin = - v.begin(), - v_end = - v.end(); + typename test::random_values::const_iterator v_begin = v.begin(), + v_end = v.end(); T x(test::input_iterator(v_begin), test::input_iterator(v_end), 0, hf1, eq1); - BOOST_DEDUCED_TYPENAME T::const_iterator x_begin = x.begin(), - x_end = x.end(); + typename T::const_iterator x_begin = x.begin(), x_end = x.end(); T y(test::input_iterator(x_begin), test::input_iterator(x_end), 0, hf2, eq2); test::check_container(x, v); @@ -320,7 +317,7 @@ namespace constructor_tests { } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - std::initializer_list list; + std::initializer_list list; UNORDERED_SUB_TEST("Initializer list construct 1") { @@ -386,8 +383,8 @@ namespace constructor_tests { template void map_constructor_test(T*, test::random_generator const& generator) { - typedef test::list > + typedef test::list< + std::pair > list; test::random_values v(1000, generator); list l(v.begin(), v.end()); diff --git a/test/unordered/copy_tests.cpp b/test/unordered/copy_tests.cpp index 17df86d8..1f1ac8f5 100644 --- a/test/unordered/copy_tests.cpp +++ b/test/unordered/copy_tests.cpp @@ -25,11 +25,11 @@ namespace copy_tests { template void copy_construct_tests1(T*, test::random_generator const& generator) { - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typedef typename T::allocator_type allocator_type; - BOOST_DEDUCED_TYPENAME T::hasher hf; - BOOST_DEDUCED_TYPENAME T::key_equal eq; - BOOST_DEDUCED_TYPENAME T::allocator_type al; + typename T::hasher hf; + typename T::key_equal eq; + typename T::allocator_type al; { test::check_instances check_; @@ -84,12 +84,12 @@ namespace copy_tests { template void copy_construct_tests2(T*, test::random_generator const& generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf(1); - BOOST_DEDUCED_TYPENAME T::key_equal eq(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al2(2); + typename T::hasher hf(1); + typename T::key_equal eq(1); + typename T::allocator_type al(1); + typename T::allocator_type al2(2); - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typedef typename T::allocator_type allocator_type; { test::check_instances check_; diff --git a/test/unordered/erase_tests.cpp b/test/unordered/erase_tests.cpp index ec26ab2d..fecb7dc0 100644 --- a/test/unordered/erase_tests.cpp +++ b/test/unordered/erase_tests.cpp @@ -27,8 +27,8 @@ namespace erase_tests { template void erase_tests1(Container*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME Container::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME Container::const_iterator c_iterator; + typedef typename Container::iterator iterator; + typedef typename Container::const_iterator c_iterator; BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Erase by key.\n"; { @@ -37,8 +37,7 @@ namespace erase_tests { test::random_values v(1000, generator); Container x(v.begin(), v.end()); int iterations = 0; - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { std::size_t count = x.count(test::get_key(*it)); std::size_t old_size = x.size(); @@ -60,8 +59,7 @@ namespace erase_tests { std::size_t size = x.size(); int iterations = 0; while (size > 0 && !x.empty()) { - BOOST_DEDUCED_TYPENAME Container::key_type key = - test::get_key(*x.begin()); + typename Container::key_type key = test::get_key(*x.begin()); std::size_t count = x.count(key); iterator pos = x.erase(x.begin()); --size; @@ -92,8 +90,7 @@ namespace erase_tests { pos = test::next(prev); } next = test::next(pos); - BOOST_DEDUCED_TYPENAME Container::key_type key = - test::get_key(*pos); + typename Container::key_type key = test::get_key(*pos); std::size_t count = x.count(key); BOOST_TEST(count > 0); BOOST_TEST(next == x.erase(pos)); @@ -163,7 +160,7 @@ namespace erase_tests { test::next(iterators.begin(), start + length)); BOOST_TEST(x.size() == iterators.size() - 1); - BOOST_DEDUCED_TYPENAME std::vector::const_iterator i2 = + typename std::vector::const_iterator i2 = iterators.begin(); for (c_iterator i1 = x.cbegin(); i1 != x.cend(); ++i1) { BOOST_TEST(i1 == *i2); @@ -186,8 +183,7 @@ namespace erase_tests { std::size_t size = x.size(); int iterations = 0; while (size > 0 && !x.empty()) { - BOOST_DEDUCED_TYPENAME Container::key_type key = - test::get_key(*x.begin()); + typename Container::key_type key = test::get_key(*x.begin()); std::size_t count = x.count(key); x.quick_erase(x.begin()); --size; @@ -209,7 +205,7 @@ namespace erase_tests { int iterations = 0; while (size > 0 && !x.empty()) { std::size_t index = test::random_value(x.size()); - BOOST_DEDUCED_TYPENAME Container::const_iterator prev, pos, next; + typename Container::const_iterator prev, pos, next; if (index == 0) { prev = pos = x.begin(); } else { @@ -217,8 +213,7 @@ namespace erase_tests { pos = test::next(prev); } next = test::next(pos); - BOOST_DEDUCED_TYPENAME Container::key_type key = - test::get_key(*pos); + typename Container::key_type key = test::get_key(*pos); std::size_t count = x.count(key); BOOST_TEST(count > 0); x.quick_erase(pos); diff --git a/test/unordered/extract_tests.cpp b/test/unordered/extract_tests.cpp index aef7fb4e..14338738 100644 --- a/test/unordered/extract_tests.cpp +++ b/test/unordered/extract_tests.cpp @@ -32,8 +32,7 @@ namespace extract_tests { test::random_values v(1000, generator); Container x(v.begin(), v.end()); int iterations = 0; - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { std::size_t count = x.count(test::get_key(*it)); std::size_t old_size = x.size(); @@ -64,8 +63,7 @@ namespace extract_tests { std::size_t size = x.size(); int iterations = 0; while (size > 0 && !x.empty()) { - BOOST_DEDUCED_TYPENAME Container::key_type key = - test::get_key(*x.begin()); + typename Container::key_type key = test::get_key(*x.begin()); std::size_t count = x.count(key); typename Container::node_type n = x.extract(x.begin()); BOOST_TEST(n); @@ -89,7 +87,7 @@ namespace extract_tests { while (size > 0 && !x.empty()) { using namespace std; int index = rand() % (int)x.size(); - BOOST_DEDUCED_TYPENAME Container::const_iterator prev, pos, next; + typename Container::const_iterator prev, pos, next; if (index == 0) { prev = pos = x.begin(); } else { @@ -97,8 +95,7 @@ namespace extract_tests { pos = test::next(prev); } next = test::next(pos); - BOOST_DEDUCED_TYPENAME Container::key_type key = - test::get_key(*pos); + typename Container::key_type key = test::get_key(*pos); std::size_t count = x.count(key); typename Container::node_type n = x.extract(pos); BOOST_TEST(n); diff --git a/test/unordered/find_tests.cpp b/test/unordered/find_tests.cpp index 268d42bb..031371c3 100644 --- a/test/unordered/find_tests.cpp +++ b/test/unordered/find_tests.cpp @@ -22,7 +22,7 @@ namespace find_tests { template void find_tests1(X*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; { test::check_instances check_; @@ -33,11 +33,10 @@ namespace find_tests { test::ordered tracker = test::create_ordered(x); tracker.insert_range(v.begin(), v.end()); - for (BOOST_DEDUCED_TYPENAME test::ordered::const_iterator it1 = - tracker.begin(); + for (typename test::ordered::const_iterator it1 = tracker.begin(); it1 != tracker.end(); ++it1) { - BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key(*it1); - BOOST_DEDUCED_TYPENAME X::const_iterator const_pos = x_const.find(key); + typename X::key_type key = test::get_key(*it1); + typename X::const_iterator const_pos = x_const.find(key); iterator pos = x.find(key); BOOST_TEST(const_pos != x_const.end()); BOOST_TEST(const_pos != x_const.end() && @@ -48,16 +47,15 @@ namespace find_tests { BOOST_TEST(x.count(key) == tracker.count(key)); test::compare_pairs(x.equal_range(key), tracker.equal_range(key), - (BOOST_DEDUCED_TYPENAME X::value_type*)0); + (typename X::value_type*)0); test::compare_pairs(x_const.equal_range(key), tracker.equal_range(key), - (BOOST_DEDUCED_TYPENAME X::value_type*)0); + (typename X::value_type*)0); } test::random_values v2(500, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::const_iterator it2 = - v2.begin(); + for (typename test::random_values::const_iterator it2 = v2.begin(); it2 != v2.end(); ++it2) { - BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key(*it2); + typename X::key_type key = test::get_key(*it2); if (tracker.find(test::get_key(key)) == tracker.end()) { BOOST_TEST(x.find(key) == x.end()); BOOST_TEST(x_const.find(key) == x_const.end()); @@ -74,10 +72,9 @@ namespace find_tests { X x; test::random_values v2(5, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::const_iterator it3 = - v2.begin(); + for (typename test::random_values::const_iterator it3 = v2.begin(); it3 != v2.end(); ++it3) { - BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key(*it3); + typename X::key_type key = test::get_key(*it3); BOOST_TEST(x.find(key) == x.end()); BOOST_TEST(x.count(key) == 0); std::pair range = x.equal_range(key); @@ -116,8 +113,7 @@ namespace find_tests { template void find_compatible_keys_test(X*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME test::random_values::iterator - value_iterator; + typedef typename test::random_values::iterator value_iterator; test::random_values v(500, generator); X x(v.begin(), v.end()); @@ -125,14 +121,14 @@ namespace find_tests { compatible_predicate eq; for (value_iterator it = v.begin(), end = v.end(); it != end; ++it) { - BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key(*it); + typename X::key_type key = test::get_key(*it); BOOST_TEST(x.find(key) == x.find(compatible_key(key), h, eq)); } test::random_values v2(20, generator); for (value_iterator it = v2.begin(), end = v2.end(); it != end; ++it) { - BOOST_DEDUCED_TYPENAME X::key_type key = test::get_key(*it); + typename X::key_type key = test::get_key(*it); BOOST_TEST(x.find(key) == x.find(compatible_key(key), h, eq)); } } diff --git a/test/unordered/insert_tests.cpp b/test/unordered/insert_tests.cpp index db3bae82..7ddb41fd 100644 --- a/test/unordered/insert_tests.cpp +++ b/test/unordered/insert_tests.cpp @@ -30,7 +30,7 @@ namespace insert_tests { { test::check_instances check_; - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; typedef test::ordered ordered; UNORDERED_SUB_TEST("insert(value) tests for containers with unique keys") @@ -40,16 +40,14 @@ namespace insert_tests { test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); std::pair r1 = x.insert(*it); - std::pair r2 = - tracker.insert(*it); + std::pair r2 = tracker.insert(*it); BOOST_TEST(r1.second == r2.second); BOOST_TEST(*r1.first == *r2.first); @@ -71,17 +69,15 @@ namespace insert_tests { test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); typename X::value_type value = *it; std::pair r1 = x.insert(boost::move(value)); - std::pair r2 = - tracker.insert(*it); + std::pair r2 = tracker.insert(*it); BOOST_TEST(r1.second == r2.second); BOOST_TEST(*r1.first == *r2.first); @@ -109,15 +105,13 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); - BOOST_DEDUCED_TYPENAME X::iterator r1 = x.insert(*it); - BOOST_DEDUCED_TYPENAME test::ordered::iterator r2 = - tracker.insert(*it); + typename X::iterator r1 = x.insert(*it); + typename test::ordered::iterator r2 = tracker.insert(*it); BOOST_TEST(*r1 == *r2); @@ -138,16 +132,14 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); typename X::value_type value = *it; - BOOST_DEDUCED_TYPENAME X::iterator r1 = x.insert(boost::move(value)); - BOOST_DEDUCED_TYPENAME test::ordered::iterator r2 = - tracker.insert(*it); + typename X::iterator r1 = x.insert(boost::move(value)); + typename test::ordered::iterator r2 = tracker.insert(*it); BOOST_TEST(*r1 == *r2); @@ -164,10 +156,10 @@ namespace insert_tests { template void insert_tests2(X*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME test::ordered tracker_type; - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; - typedef BOOST_DEDUCED_TYPENAME X::const_iterator const_iterator; - typedef BOOST_DEDUCED_TYPENAME tracker_type::iterator tracker_iterator; + typedef typename test::ordered tracker_type; + typedef typename X::iterator iterator; + typedef typename X::const_iterator const_iterator; + typedef typename tracker_type::iterator tracker_iterator; UNORDERED_SUB_TEST("insert(begin(), value) tests") { @@ -177,10 +169,9 @@ namespace insert_tests { tracker_type tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator r1 = x.insert(x.begin(), *it); @@ -206,10 +197,9 @@ namespace insert_tests { tracker_type tracker = test::create_ordered(x); test::random_values v(100, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); const_iterator r1 = x.insert(x_const.end(), *it); @@ -235,10 +225,9 @@ namespace insert_tests { tracker_type tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); pos = x.insert(pos, *it); @@ -264,10 +253,9 @@ namespace insert_tests { tracker_type tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); typename X::value_type value = *it; @@ -293,10 +281,9 @@ namespace insert_tests { tracker_type tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); x.insert(it, test::next(it)); @@ -349,10 +336,8 @@ namespace insert_tests { X x; test::random_values v(1000, generator); - BOOST_DEDUCED_TYPENAME test::random_values::const_iterator begin = - v.begin(), - end = - v.end(); + typename test::random_values::const_iterator begin = v.begin(), + end = v.end(); x.insert(test::input_iterator(begin), test::input_iterator(end)); test::check_container(x, v); @@ -394,14 +379,12 @@ namespace insert_tests { test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end();) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = - x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); - BOOST_DEDUCED_TYPENAME test::random_values::iterator next = it; + typename test::random_values::iterator next = it; for (std::size_t j = test::random_value(20); j > 0; ++j) { ++next; if (next == v.end()) { @@ -428,7 +411,7 @@ namespace insert_tests { template void unique_emplace_tests1(X*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; typedef test::ordered ordered; X x; @@ -436,15 +419,14 @@ namespace insert_tests { test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); std::pair r1 = x.emplace(*it); - std::pair r2 = - tracker.insert(*it); + std::pair r2 = tracker.insert(*it); BOOST_TEST(r1.second == r2.second); BOOST_TEST(*r1.first == *r2.first); @@ -467,14 +449,13 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); - BOOST_DEDUCED_TYPENAME X::iterator r1 = x.emplace(*it); - BOOST_DEDUCED_TYPENAME test::ordered::iterator r2 = - tracker.insert(*it); + typename X::iterator r1 = x.emplace(*it); + typename test::ordered::iterator r2 = tracker.insert(*it); BOOST_TEST(*r1 == *r2); @@ -497,10 +478,10 @@ namespace insert_tests { test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); typename X::value_type value = *it; @@ -558,9 +539,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); x[it->first] = it->second; @@ -579,7 +560,7 @@ namespace insert_tests { template void map_tests2(X*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; UNORDERED_SUB_TEST("insert_or_assign") { @@ -589,10 +570,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); std::pair r = x.insert_or_assign(it->first, it->second); @@ -618,10 +598,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator r = x.insert_or_assign(x.begin(), it->first, it->second); @@ -647,10 +626,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator r = x.insert_or_assign(x.end(), it->first, it->second); @@ -677,10 +655,9 @@ namespace insert_tests { iterator last = x.begin(); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator r = x.insert_or_assign(last, it->first, it->second); @@ -704,7 +681,7 @@ namespace insert_tests { template void try_emplace_tests(X*, test::random_generator generator) { - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; UNORDERED_SUB_TEST("try_emplace(key, value)") { @@ -714,10 +691,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator pos = x.find(it->first); @@ -745,7 +721,7 @@ namespace insert_tests { test::check_equivalent_keys(x); } - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; UNORDERED_SUB_TEST("try_emplace(begin(), key, value)") { @@ -755,10 +731,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator pos = x.find(it->first); @@ -783,7 +758,7 @@ namespace insert_tests { test::check_equivalent_keys(x); } - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; UNORDERED_SUB_TEST("try_emplace(end(), key, value)") { @@ -793,10 +768,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator pos = x.find(it->first); @@ -820,7 +794,7 @@ namespace insert_tests { test::check_equivalent_keys(x); } - typedef BOOST_DEDUCED_TYPENAME X::iterator iterator; + typedef typename X::iterator iterator; UNORDERED_SUB_TEST("try_emplace(pos, key, value)") { @@ -830,10 +804,9 @@ namespace insert_tests { test::ordered tracker = test::create_ordered(x); test::random_values v(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::iterator it = - v.begin(); + for (typename test::random_values::iterator it = v.begin(); it != v.end(); ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_bucket_count = x.bucket_count(); + typename X::size_type old_bucket_count = x.bucket_count(); float b = x.max_load_factor(); iterator pos = x.find(it->first); @@ -866,8 +839,8 @@ namespace insert_tests { { test::check_instances check_; - typedef test::list > + typedef test::list< + std::pair > list; test::random_values v(1000, generator); list l(v.begin(), v.end()); @@ -883,11 +856,11 @@ namespace insert_tests { { test::check_instances check_; - typedef test::list > + typedef test::list< + std::pair > list; - test::random_values > + test::random_values< + boost::unordered_map > v(1000, generator); list l(v.begin(), v.end()); diff --git a/test/unordered/load_factor_tests.cpp b/test/unordered/load_factor_tests.cpp index 9c76a743..9006c1bd 100644 --- a/test/unordered/load_factor_tests.cpp +++ b/test/unordered/load_factor_tests.cpp @@ -47,12 +47,11 @@ namespace load_factor_tests { test::random_values values(1000, generator); - for (BOOST_DEDUCED_TYPENAME test::random_values::const_iterator - it = values.begin(), - end = values.end(); + for (typename test::random_values::const_iterator it = values.begin(), + end = values.end(); it != end; ++it) { - BOOST_DEDUCED_TYPENAME X::size_type old_size = x.size(), - old_bucket_count = x.bucket_count(); + typename X::size_type old_size = x.size(), + old_bucket_count = x.bucket_count(); x.insert(*it); if (static_cast(old_size + 1) <= b * static_cast(old_bucket_count)) diff --git a/test/unordered/move_tests.cpp b/test/unordered/move_tests.cpp index 5d0d37d8..82ba6011 100644 --- a/test/unordered/move_tests.cpp +++ b/test/unordered/move_tests.cpp @@ -43,8 +43,8 @@ namespace move_tests { template T create(test::random_values const& v, test::object_count& count, - BOOST_DEDUCED_TYPENAME T::hasher hf, BOOST_DEDUCED_TYPENAME T::key_equal eq, - BOOST_DEDUCED_TYPENAME T::allocator_type al, float mlf) + typename T::hasher hf, typename T::key_equal eq, + typename T::allocator_type al, float mlf) { T x(0, hf, eq, al); x.max_load_factor(mlf); @@ -56,9 +56,9 @@ namespace move_tests { template void move_construct_tests1(T* ptr, test::random_generator const& generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf; - BOOST_DEDUCED_TYPENAME T::key_equal eq; - BOOST_DEDUCED_TYPENAME T::allocator_type al; + typename T::hasher hf; + typename T::key_equal eq; + typename T::allocator_type al; { test::check_instances check_; @@ -107,10 +107,10 @@ namespace move_tests { template void move_construct_tests2(T*, test::random_generator const& generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf(1); - BOOST_DEDUCED_TYPENAME T::key_equal eq(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al2(2); + typename T::hasher hf(1); + typename T::key_equal eq(1); + typename T::allocator_type al(1); + typename T::allocator_type al2(2); test::object_count count; @@ -180,11 +180,11 @@ namespace move_tests { template void move_assign_tests2(T*, test::random_generator const& generator) { - BOOST_DEDUCED_TYPENAME T::hasher hf(1); - BOOST_DEDUCED_TYPENAME T::key_equal eq(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al1(1); - BOOST_DEDUCED_TYPENAME T::allocator_type al2(2); - typedef BOOST_DEDUCED_TYPENAME T::allocator_type allocator_type; + typename T::hasher hf(1); + typename T::key_equal eq(1); + typename T::allocator_type al1(1); + typename T::allocator_type al2(2); + typedef typename T::allocator_type allocator_type; { test::random_values v(500, generator); diff --git a/test/unordered/node_handle_tests.cpp b/test/unordered/node_handle_tests.cpp index f1b9c965..2d5b1eab 100644 --- a/test/unordered/node_handle_tests.cpp +++ b/test/unordered/node_handle_tests.cpp @@ -147,24 +147,24 @@ UNORDERED_AUTO_TEST (failed_insertion_with_hint) { template bool node_handle_compare( - NodeHandle const& nh, BOOST_DEDUCED_TYPENAME NodeHandle::value_type const& x) + NodeHandle const& nh, typename NodeHandle::value_type const& x) { return x == nh.value(); } template -bool node_handle_compare(NodeHandle const& nh, - std::pair const& x) +bool node_handle_compare( + NodeHandle const& nh, std::pair const& x) { return x.first == nh.key() && x.second == nh.mapped(); } template void node_handle_tests_impl(Container& c) { - typedef BOOST_DEDUCED_TYPENAME Container::node_type node_type; + typedef typename Container::node_type node_type; - BOOST_DEDUCED_TYPENAME Container::value_type value = *c.begin(); + typename Container::value_type value = *c.begin(); node_type n1; BOOST_TEST(!n1); @@ -195,9 +195,9 @@ template void node_handle_tests_impl(Container& c) n3 = boost::move(n3); BOOST_TEST(!n3); - BOOST_DEDUCED_TYPENAME Container::value_type value1 = *c.begin(); + typename Container::value_type value1 = *c.begin(); n1 = c.extract(c.begin()); - BOOST_DEDUCED_TYPENAME Container::value_type value2 = *c.begin(); + typename Container::value_type value2 = *c.begin(); n2 = c.extract(c.begin()); n3 = node_type(); @@ -248,15 +248,13 @@ UNORDERED_AUTO_TEST (node_handle_tests) { template void insert_node_handle_unique(Container1& c1, Container2& c2) { - typedef BOOST_DEDUCED_TYPENAME Container1::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_type; - BOOST_STATIC_ASSERT((boost::is_same::value)); + typedef typename Container1::node_type node_type; + typedef typename Container1::value_type value_type; + BOOST_STATIC_ASSERT( + (boost::is_same::value)); - typedef BOOST_DEDUCED_TYPENAME Container1::insert_return_type - insert_return_type1; - typedef BOOST_DEDUCED_TYPENAME Container2::insert_return_type - insert_return_type2; + typedef typename Container1::insert_return_type insert_return_type1; + typedef typename Container2::insert_return_type insert_return_type2; insert_return_type1 r1 = c1.insert(node_type()); insert_return_type2 r2 = c2.insert(node_type()); @@ -293,15 +291,14 @@ void insert_node_handle_unique(Container1& c1, Container2& c2) template void insert_node_handle_unique2(Container1& c1, Container2& c2) { - typedef BOOST_DEDUCED_TYPENAME Container1::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_type; - BOOST_STATIC_ASSERT((boost::is_same::value)); + typedef typename Container1::node_type node_type; + typedef typename Container1::value_type value_type; + BOOST_STATIC_ASSERT( + (boost::is_same::value)); - // typedef BOOST_DEDUCED_TYPENAME Container1::insert_return_type + // typedef typename Container1::insert_return_type // insert_return_type1; - typedef BOOST_DEDUCED_TYPENAME Container2::insert_return_type - insert_return_type2; + typedef typename Container2::insert_return_type insert_return_type2; while (!c1.empty()) { value_type v = *c1.begin(); @@ -327,13 +324,13 @@ void insert_node_handle_unique2(Container1& c1, Container2& c2) template void insert_node_handle_equiv(Container1& c1, Container2& c2) { - typedef BOOST_DEDUCED_TYPENAME Container1::node_type node_type; - typedef BOOST_DEDUCED_TYPENAME Container1::value_type value_type; - BOOST_STATIC_ASSERT((boost::is_same::value)); + typedef typename Container1::node_type node_type; + typedef typename Container1::value_type value_type; + BOOST_STATIC_ASSERT( + (boost::is_same::value)); - typedef BOOST_DEDUCED_TYPENAME Container1::iterator iterator1; - typedef BOOST_DEDUCED_TYPENAME Container2::iterator iterator2; + typedef typename Container1::iterator iterator1; + typedef typename Container2::iterator iterator2; iterator1 r1 = c1.insert(node_type()); iterator2 r2 = c2.insert(node_type()); diff --git a/test/unordered/rehash_tests.cpp b/test/unordered/rehash_tests.cpp index 87a49593..65c08936 100644 --- a/test/unordered/rehash_tests.cpp +++ b/test/unordered/rehash_tests.cpp @@ -20,8 +20,7 @@ namespace rehash_tests { test::seed_t initialize_seed(2974); - template - bool postcondition(X const& x, BOOST_DEDUCED_TYPENAME X::size_type n) + template bool postcondition(X const& x, typename X::size_type n) { return static_cast(x.bucket_count()) >= static_cast(x.size()) / x.max_load_factor() && diff --git a/test/unordered/simple_tests.cpp b/test/unordered/simple_tests.cpp index 9fa21e17..d8a9ce41 100644 --- a/test/unordered/simple_tests.cpp +++ b/test/unordered/simple_tests.cpp @@ -73,7 +73,7 @@ template void simple_test(X const& a) } { - BOOST_TEST(a.size() == static_cast( + BOOST_TEST(a.size() == static_cast( std::distance(a.begin(), a.end()))); } diff --git a/test/unordered/swap_tests.cpp b/test/unordered/swap_tests.cpp index 52d2c875..9a7106ef 100644 --- a/test/unordered/swap_tests.cpp +++ b/test/unordered/swap_tests.cpp @@ -78,9 +78,9 @@ namespace swap_tests { { swap_tests1(ptr, generator); - typedef BOOST_DEDUCED_TYPENAME X::hasher hasher; - typedef BOOST_DEDUCED_TYPENAME X::key_equal key_equal; - typedef BOOST_DEDUCED_TYPENAME X::allocator_type allocator_type; + typedef typename X::hasher hasher; + typedef typename X::key_equal key_equal; + typedef typename X::allocator_type allocator_type; { test::check_instances check_; diff --git a/test/unordered/unnecessary_copy_tests.cpp b/test/unordered/unnecessary_copy_tests.cpp index 929d55fe..1c5ff4b7 100644 --- a/test/unordered/unnecessary_copy_tests.cpp +++ b/test/unordered/unnecessary_copy_tests.cpp @@ -177,7 +177,7 @@ namespace unnecessary_copy_tests { template void unnecessary_copy_insert_test(T*) { T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; reset(); x.insert(a); COPY_COUNT(1); @@ -187,13 +187,13 @@ namespace unnecessary_copy_tests { template void unnecessary_copy_insert_rvalue_set_test(T*) { T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; reset(); x.insert(boost::move(a)); COPY_COUNT(0); MOVE_COUNT(1); - BOOST_DEDUCED_TYPENAME T::value_type a2; + typename T::value_type a2; reset(); x.insert(boost::move(a)); COPY_COUNT(0); @@ -207,7 +207,7 @@ namespace unnecessary_copy_tests { // construct_from_args. T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; reset(); x.insert(boost::move(a)); #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -218,7 +218,7 @@ namespace unnecessary_copy_tests { MOVE_COUNT(1); #endif - BOOST_DEDUCED_TYPENAME T::value_type a2; + typename T::value_type a2; reset(); x.insert(boost::move(a)); #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -243,7 +243,7 @@ namespace unnecessary_copy_tests { { reset(); T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; COPY_COUNT(1); x.emplace(a); COPY_COUNT(2); @@ -253,7 +253,7 @@ namespace unnecessary_copy_tests { { reset(); T x; - x.emplace(source()); + x.emplace(source()); #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) COPY_COUNT(1); #else @@ -271,7 +271,7 @@ namespace unnecessary_copy_tests { { reset(); T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; COPY_COUNT(1); MOVE_COUNT(0); x.emplace(std::move(a)); @@ -287,7 +287,7 @@ namespace unnecessary_copy_tests { { reset(); T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; COPY_COUNT(1); MOVE_COUNT_EXTRA(0, 1); x.emplace(boost::move(a)); @@ -308,7 +308,7 @@ namespace unnecessary_copy_tests { { reset(); T x; - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; COPY_COUNT(1); MOVE_COUNT(0); x.emplace(boost::move(a)); @@ -325,7 +325,7 @@ namespace unnecessary_copy_tests { T x; COPY_COUNT(0); MOVE_COUNT(0); - BOOST_DEDUCED_TYPENAME T::value_type a; + typename T::value_type a; COPY_COUNT(1); MOVE_COUNT_EXTRA(0, 1); x.emplace(boost::move(a));