diff --git a/test/unordered/fwd_map_test.cpp b/test/unordered/fwd_map_test.cpp index 531d573c..dc2267bf 100644 --- a/test/unordered/fwd_map_test.cpp +++ b/test/unordered/fwd_map_test.cpp @@ -7,37 +7,54 @@ #include -typedef boost::unordered_map int_map; - -void call_swap(int_map& x, int_map& y) { +template +void call_swap(boost::unordered_map& x, + boost::unordered_map& y) +{ swap(x,y); } -bool call_equals(int_map& x, int_map& y) { +template +bool call_equals(boost::unordered_map& x, + boost::unordered_map& y) +{ return x == y; } -bool call_not_equals(int_map& x, int_map& y) { +template +bool call_not_equals(boost::unordered_map& x, + boost::unordered_map& y) +{ return x != y; } -typedef boost::unordered_multimap int_multimap; - -void call_swap(int_multimap& x, int_multimap& y) { +template +void call_swap(boost::unordered_multimap& x, + boost::unordered_multimap& y) +{ swap(x,y); } -bool call_equals(int_multimap& x, int_multimap& y) { +template +bool call_equals(boost::unordered_multimap& x, + boost::unordered_multimap& y) +{ return x == y; } -bool call_not_equals(int_multimap& x, int_multimap& y) { +template +bool call_not_equals(boost::unordered_multimap& x, + boost::unordered_multimap& y) +{ return x != y; } #include #include "../helpers/test.hpp" +typedef boost::unordered_map int_map; +typedef boost::unordered_multimap int_multimap; + UNORDERED_AUTO_TEST(use_map_fwd_declared_function) { int_map x, y; x[1] = 2; diff --git a/test/unordered/fwd_set_test.cpp b/test/unordered/fwd_set_test.cpp index 7fc3a8c1..4fa66b90 100644 --- a/test/unordered/fwd_set_test.cpp +++ b/test/unordered/fwd_set_test.cpp @@ -16,36 +16,53 @@ template true_type is_unordered_set_impl( boost::unordered_set*); -typedef boost::unordered_set int_set; - -void call_swap(int_set& x, int_set& y) { +template +void call_swap(boost::unordered_set& x, + boost::unordered_set& y) +{ swap(x,y); } -bool call_equals(int_set& x, int_set& y) { +template +bool call_equals(boost::unordered_set& x, + boost::unordered_set& y) +{ return x == y; } -bool call_not_equals(int_set& x, int_set& y) { +template +bool call_not_equals(boost::unordered_set& x, + boost::unordered_set& y) +{ return x != y; } -typedef boost::unordered_multiset int_multiset; - -void call_swap(int_multiset& x, int_multiset& y) { +template +void call_swap(boost::unordered_multiset& x, + boost::unordered_multiset& y) +{ swap(x,y); } -bool call_equals(int_multiset& x, int_multiset& y) { +template +bool call_equals(boost::unordered_multiset& x, + boost::unordered_multiset& y) +{ return x == y; } -bool call_not_equals(int_multiset& x, int_multiset& y) { +template +bool call_not_equals(boost::unordered_multiset& x, + boost::unordered_multiset& y) +{ return x != y; } #include "../helpers/test.hpp" +typedef boost::unordered_set int_set; +typedef boost::unordered_multiset int_multiset; + UNORDERED_AUTO_TEST(use_fwd_declared_trait_without_definition) { BOOST_TEST(sizeof(is_unordered_set_impl((int_set*) 0)) == sizeof(true_type));