diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 |
commit | 1c3313bd0215c89fb38710a1ea0762ccf32e859c (patch) | |
tree | 65e6d33ca6254b41a8f4230edff47c5344dbd019 /test/std/containers/unord | |
parent | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff) | |
download | src-1c3313bd0215c89fb38710a1ea0762ccf32e859c.tar.gz src-1c3313bd0215c89fb38710a1ea0762ccf32e859c.zip |
Vendor import of libc++ trunk r300890:vendor/libc++/libc++-trunk-r300890
Notes
Notes:
svn path=/vendor/libc++/dist/; revision=317224
svn path=/vendor/libc++/libc++-trunk-r300890/; revision=317225; tag=vendor/libc++/libc++-trunk-r300890
Diffstat (limited to 'test/std/containers/unord')
48 files changed, 104 insertions, 342 deletions
diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp index 4d92b3d4c2c5..9fca1f105928 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -27,7 +29,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::allocator<std::pair<const int, std::string> > A; typedef std::unordered_map<int, std::string, @@ -60,7 +61,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef min_allocator<std::pair<const int, std::string> > A; typedef std::unordered_map<int, std::string, @@ -93,6 +93,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp index e86d35b0ac8b..0d08fae0c3bc 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator<std::pair<const int, std::string> > A; typedef std::unordered_map<int, std::string, @@ -167,7 +168,6 @@ int main() assert(c.max_load_factor() == 1); assert(c0.size() == 0); } -#if TEST_STD_VER >= 11 { typedef min_allocator<std::pair<const int, std::string> > A; typedef std::unordered_map<int, std::string, @@ -214,18 +214,4 @@ int main() assert(c.max_load_factor() == 1); assert(c0.size() == 0); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - std::unordered_map<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}}; - std::unordered_map<int, int>::iterator i = s1.begin(); - std::pair<const int, int> k = *i; - std::unordered_map<int, int> s2; - s2 = std::move(s1); - assert(*i == k); - s2.erase(i); - assert(s2.size() == 2); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp index bebab0375d86..b06e4db1303a 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -61,7 +62,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -158,7 +158,5 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // TEST_STD_VER > 11 } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp index 9055e3dcd166..ca48808f4819 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -64,7 +65,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -98,6 +98,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp index db0010b3401c..02360f8ac1bb 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -65,7 +66,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -100,6 +100,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp index c76ce3968ad3..c6a3976560b7 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -31,7 +33,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -67,7 +68,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -103,6 +103,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp index 6cb57d4ff210..5acc4c34bc1f 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -31,7 +33,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -68,7 +69,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, std::string, test_hash<std::hash<int> >, @@ -141,6 +141,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp index 681c0e95b937..296363166618 100644 --- a/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair<int, std::string> P; typedef test_allocator<std::pair<const int, std::string>> A; @@ -113,7 +114,6 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef std::pair<int, std::string> P; typedef min_allocator<std::pair<const int, std::string>> A; @@ -196,6 +196,4 @@ int main() assert(c0.empty()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp b/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp index 26f716166464..18c83dd31309 100644 --- a/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.modifiers/emplace.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -24,7 +26,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map<int, Emplaceable> C; typedef std::pair<C::iterator, bool> R; @@ -49,7 +50,6 @@ int main() assert(r.first->first == 5); assert(r.first->second == Emplaceable(6, 7)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, Emplaceable, std::hash<int>, std::equal_to<int>, min_allocator<std::pair<const int, Emplaceable>>> C; @@ -75,6 +75,4 @@ int main() assert(r.first->first == 5); assert(r.first->second == Emplaceable(6, 7)); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp b/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp index 477f2cf02e76..ce7fa835ce8b 100644 --- a/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.modifiers/emplace_hint.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -16,9 +18,6 @@ // template <class... Args> // iterator emplace_hint(const_iterator p, Args&&... args); -#if _LIBCPP_DEBUG >= 1 -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif #include <unordered_map> #include <cassert> @@ -28,7 +27,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_map<int, Emplaceable> C; typedef C::iterator R; @@ -51,7 +49,6 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, Emplaceable, std::hash<int>, std::equal_to<int>, min_allocator<std::pair<const int, Emplaceable>>> C; @@ -75,19 +72,4 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - typedef std::unordered_map<int, Emplaceable> C; - typedef C::iterator R; - typedef C::value_type P; - C c; - C c2; - R r = c.emplace_hint(c2.end(), std::piecewise_construct, - std::forward_as_tuple(3), - std::forward_as_tuple()); - assert(false); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp b/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp index a4d8b5d410b4..477a229d0a98 100644 --- a/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp +++ b/test/std/containers/unord/unord.map/unord.map.modifiers/insert_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -24,7 +26,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map<int, std::string> C; typedef std::pair<int, std::string> P; @@ -45,7 +46,6 @@ int main() assert(c.at(3) == "three"); assert(c.at(4) == "four"); } -#if TEST_STD_VER >= 11 { typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>, min_allocator<std::pair<const int, std::string>>> C; @@ -67,6 +67,4 @@ int main() assert(c.at(3) == "three"); assert(c.at(4) == "four"); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp index 6d27dec98eaa..cefbf4596550 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -28,7 +30,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef test_allocator<std::pair<const int, std::string> > A; typedef std::unordered_multimap<int, std::string, @@ -85,7 +86,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef min_allocator<std::pair<const int, std::string> > A; typedef std::unordered_multimap<int, std::string, @@ -142,6 +142,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp index b9b8723452fe..9bd55ac92e89 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator<std::pair<const int, std::string> > A; typedef std::unordered_multimap<int, std::string, @@ -225,7 +226,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef min_allocator<std::pair<const int, std::string> > A; typedef std::unordered_multimap<int, std::string, @@ -291,18 +291,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - std::unordered_multimap<int, int> s1 = {{1, 1}, {2, 2}, {3, 3}}; - std::unordered_multimap<int, int>::iterator i = s1.begin(); - std::pair<const int, int> k = *i; - std::unordered_multimap<int, int> s2; - s2 = std::move(s1); - assert(*i == k); - s2.erase(i); - assert(s2.size() == 2); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp index 445fd2d82bb2..1a222cef1509 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -83,7 +84,6 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >()); assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >())); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -250,7 +250,5 @@ int main() assert(c.get_allocator() == a); assert(!(c.get_allocator() == A())); } -#endif -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // TEST_STD_VER > 11 } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp index 92a43b482bdf..ef75b6ce00d3 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -86,7 +87,6 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >()); assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >())); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -142,6 +142,4 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >()); assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >())); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp index d7afafcaec92..9981253916f1 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -87,7 +88,6 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >()); assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >())); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -144,6 +144,4 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >()); assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >())); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp index 9842a4bbdaf9..1ca94641cac7 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -31,7 +33,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -89,7 +90,6 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >())); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -147,6 +147,4 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); assert((c.get_allocator() == min_allocator<std::pair<const int, std::string> >())); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp index 244c3f5c657c..e8efefbee692 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -31,7 +33,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -90,7 +91,6 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); assert((c.get_allocator() == test_allocator<std::pair<const int, std::string> >(10))); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, test_hash<std::hash<int> >, @@ -208,6 +208,4 @@ int main() assert(c.key_eq() == test_compare<std::equal_to<int> >(9)); assert(c.get_allocator() == A{}); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp index 878ef598f8cb..0e004522c8d5 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -32,7 +34,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::pair<int, std::string> P; typedef test_allocator<std::pair<const int, std::string>> A; @@ -161,7 +162,6 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef std::pair<int, std::string> P; typedef min_allocator<std::pair<const int, std::string>> A; @@ -290,6 +290,4 @@ int main() assert(c0.empty()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp index 96678cf33fa5..68e5267a9f56 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -24,7 +26,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap<int, Emplaceable> C; typedef C::iterator R; @@ -46,7 +47,6 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, Emplaceable, std::hash<int>, std::equal_to<int>, min_allocator<std::pair<const int, Emplaceable>>> C; @@ -69,6 +69,4 @@ int main() assert(r->first == 5); assert(r->second == Emplaceable(6, 7)); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp index a8095135c1c0..86950e289f3b 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -16,9 +18,6 @@ // template <class... Args> // iterator emplace_hint(const_iterator p, Args&&... args); -#if _LIBCPP_DEBUG >= 1 -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif #include <unordered_map> #include <cassert> @@ -29,7 +28,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multimap<int, Emplaceable> C; typedef C::iterator R; @@ -60,7 +58,6 @@ int main() assert(r->first == 3); LIBCPP_ASSERT(r->second == Emplaceable(5, 6)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, Emplaceable, std::hash<int>, std::equal_to<int>, min_allocator<std::pair<const int, Emplaceable>>> C; @@ -92,19 +89,4 @@ int main() assert(r->first == 3); LIBCPP_ASSERT(r->second == Emplaceable(5, 6)); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - typedef std::unordered_multimap<int, Emplaceable> C; - typedef C::iterator R; - typedef C::value_type P; - C c; - C c2; - R r = c.emplace_hint(c2.end(), std::piecewise_construct, - std::forward_as_tuple(3), - std::forward_as_tuple()); - assert(false); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp b/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp index e0b1c6941862..ef1577170f87 100644 --- a/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp +++ b/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_map> // template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, @@ -25,7 +27,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap<int, std::string> C; typedef std::pair<int, std::string> P; @@ -71,7 +72,6 @@ int main() assert(static_cast<std::size_t>(std::distance(c.begin(), c.end())) == c.size()); assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size()); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multimap<int, std::string, std::hash<int>, std::equal_to<int>, min_allocator<std::pair<const int, std::string>>> C; @@ -118,6 +118,4 @@ int main() assert(static_cast<std::size_t>(std::distance(c.begin(), c.end())) == c.size()); assert(static_cast<std::size_t>(std::distance(c.cbegin(), c.cend())) == c.size()); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/emplace.pass.cpp b/test/std/containers/unord/unord.multiset/emplace.pass.cpp index d8d9e9bc5695..5d925c8d40a7 100644 --- a/test/std/containers/unord/unord.multiset/emplace.pass.cpp +++ b/test/std/containers/unord/unord.multiset/emplace.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -24,7 +26,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset<Emplaceable> C; typedef C::iterator R; @@ -41,7 +42,6 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<Emplaceable, std::hash<Emplaceable>, std::equal_to<Emplaceable>, min_allocator<Emplaceable>> C; @@ -59,6 +59,4 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp b/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp index 3756476dc8fc..d9bab1f490e6 100644 --- a/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp +++ b/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -16,9 +18,6 @@ // template <class... Args> // iterator emplace_hint(const_iterator p, Args&&... args); -#if _LIBCPP_DEBUG >= 1 -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif #include <unordered_set> #include <cassert> @@ -28,7 +27,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset<Emplaceable> C; typedef C::iterator R; @@ -46,7 +44,6 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<Emplaceable, std::hash<Emplaceable>, std::equal_to<Emplaceable>, min_allocator<Emplaceable>> C; @@ -65,16 +62,4 @@ int main() assert(c.size() == 3); assert(*r == Emplaceable(5, 6)); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - typedef std::unordered_multiset<Emplaceable> C; - typedef C::iterator R; - C c1; - C c2; - R r = c1.emplace_hint(c2.begin(), 5, 6); - assert(false); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp b/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp index f5026e102c42..ffe6534b249a 100644 --- a/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp +++ b/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp @@ -15,13 +15,10 @@ // iterator insert(const_iterator p, value_type&& x); -#if _LIBCPP_DEBUG >= 1 -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif - #include <unordered_set> #include <cassert> +#include "test_macros.h" #include "MoveOnly.h" #include "min_allocator.h" @@ -49,7 +46,7 @@ int main() assert(c.size() == 4); assert(*r == 5.5); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<MoveOnly> C; typedef C::iterator R; @@ -72,8 +69,6 @@ int main() assert(c.size() == 4); assert(*r == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<double, std::hash<double>, std::equal_to<double>, min_allocator<double>> C; @@ -97,7 +92,6 @@ int main() assert(c.size() == 4); assert(*r == 5.5); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>, std::equal_to<MoveOnly>, min_allocator<MoveOnly>> C; @@ -121,18 +115,5 @@ int main() assert(c.size() == 4); assert(*r == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if _LIBCPP_DEBUG >= 1 - { - typedef std::unordered_multiset<double> C; - typedef C::iterator R; - typedef C::value_type P; - C c; - C c2; - C::const_iterator e = c2.end(); - R r = c.insert(e, P(3.5)); - assert(false); - } -#endif -#endif +#endif // TEST_STD_VER >= 11 } diff --git a/test/std/containers/unord/unord.multiset/insert_init.pass.cpp b/test/std/containers/unord/unord.multiset/insert_init.pass.cpp index 9010cac99caf..88661b5699cb 100644 --- a/test/std/containers/unord/unord.multiset/insert_init.pass.cpp +++ b/test/std/containers/unord/unord.multiset/insert_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -23,7 +25,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset<int> C; typedef int P; @@ -44,7 +45,6 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C; @@ -66,6 +66,4 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp b/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp index 04f9e34164ab..89394901071f 100644 --- a/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp +++ b/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> +#include "test_macros.h" #include "MoveOnly.h" #include "min_allocator.h" @@ -44,7 +45,7 @@ int main() assert(c.size() == 4); assert(*r == 5.5); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<MoveOnly> C; typedef C::iterator R; @@ -66,8 +67,6 @@ int main() assert(c.size() == 4); assert(*r == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<double, std::hash<double>, std::equal_to<double>, min_allocator<double>> C; @@ -90,7 +89,6 @@ int main() assert(c.size() == 4); assert(*r == 5.5); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>, std::equal_to<MoveOnly>, min_allocator<MoveOnly>> C; @@ -113,6 +111,5 @@ int main() assert(c.size() == 4); assert(*r == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#endif +#endif // TEST_STD_VER >= 11 } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp index 3e42305309fd..ce664034d1e1 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -27,7 +29,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef test_allocator<int> A; typedef std::unordered_multiset<int, @@ -60,7 +61,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef min_allocator<int> A; typedef std::unordered_multiset<int, @@ -93,6 +93,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp index 658bb93e2b1a..dfcb63e6e0eb 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -28,7 +30,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator<int> A; typedef std::unordered_multiset<int, @@ -172,7 +173,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef test_allocator<int> A; typedef std::unordered_multiset<int, @@ -263,18 +263,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - std::unordered_multiset<int> s1 = {1, 2, 3}; - std::unordered_multiset<int>::iterator i = s1.begin(); - int k = *i; - std::unordered_multiset<int> s2; - s2 = std::move(s1); - assert(*i == k); - s2.erase(i); - assert(s2.size() == 2); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp index ced52b5e6b46..df49abe077ca 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -28,7 +30,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -59,7 +60,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -159,7 +159,5 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // TEST_STD_VER > 11 } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp index 845139f98d9c..b83507934653 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -62,7 +63,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -95,6 +95,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp index 4dc78bd261cb..92edfc35b9b1 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -64,7 +65,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -98,6 +98,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp index f331208596b7..877306db6620 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -65,7 +66,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -100,6 +100,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp index 17f064f46280..e77be84630ea 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -66,7 +67,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_multiset<int, test_hash<std::hash<int> >, @@ -102,6 +102,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp index bc804b42e22d..fb144d9b1e3f 100644 --- a/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int P; typedef test_allocator<int> A; @@ -120,7 +121,6 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef int P; typedef min_allocator<int> A; @@ -203,6 +203,4 @@ int main() assert(c0.empty()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.set/emplace.pass.cpp b/test/std/containers/unord/unord.set/emplace.pass.cpp index 19af8065819c..c09ad1505cd5 100644 --- a/test/std/containers/unord/unord.set/emplace.pass.cpp +++ b/test/std/containers/unord/unord.set/emplace.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -24,7 +26,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set<Emplaceable> C; typedef std::pair<C::iterator, bool> R; @@ -44,7 +45,6 @@ int main() assert(*r.first == Emplaceable(5, 6)); assert(!r.second); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<Emplaceable, std::hash<Emplaceable>, std::equal_to<Emplaceable>, min_allocator<Emplaceable>> C; @@ -65,6 +65,4 @@ int main() assert(*r.first == Emplaceable(5, 6)); assert(!r.second); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.set/emplace_hint.pass.cpp b/test/std/containers/unord/unord.set/emplace_hint.pass.cpp index 97f3591d012b..16f9eff196a6 100644 --- a/test/std/containers/unord/unord.set/emplace_hint.pass.cpp +++ b/test/std/containers/unord/unord.set/emplace_hint.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -16,9 +18,6 @@ // template <class... Args> // iterator emplace_hint(const_iterator p, Args&&... args); -#if _LIBCPP_DEBUG >= 1 -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif #include <unordered_set> #include <cassert> @@ -28,7 +27,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set<Emplaceable> C; typedef C::iterator R; @@ -46,7 +44,6 @@ int main() assert(c.size() == 2); assert(*r == Emplaceable(5, 6)); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<Emplaceable, std::hash<Emplaceable>, std::equal_to<Emplaceable>, min_allocator<Emplaceable>> C; @@ -65,16 +62,4 @@ int main() assert(c.size() == 2); assert(*r == Emplaceable(5, 6)); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - typedef std::unordered_set<Emplaceable> C; - typedef C::iterator R; - C c1; - C c2; - R r = c1.emplace_hint(c2.begin(), 5, 6); - assert(false); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp b/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp index da94bc55382f..676c395270e9 100644 --- a/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp +++ b/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp @@ -15,13 +15,10 @@ // iterator insert(const_iterator p, value_type&& x); -#if _LIBCPP_DEBUG >= 1 -#define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0)) -#endif - #include <unordered_set> #include <cassert> +#include "test_macros.h" #include "MoveOnly.h" #include "min_allocator.h" @@ -49,7 +46,7 @@ int main() assert(c.size() == 3); assert(*r == 5.5); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { typedef std::unordered_set<MoveOnly> C; typedef C::iterator R; @@ -72,8 +69,6 @@ int main() assert(c.size() == 3); assert(*r == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11 { typedef std::unordered_set<double, std::hash<double>, std::equal_to<double>, min_allocator<double>> C; @@ -97,7 +92,6 @@ int main() assert(c.size() == 3); assert(*r == 5.5); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>, std::equal_to<MoveOnly>, min_allocator<MoveOnly>> C; @@ -121,18 +115,5 @@ int main() assert(c.size() == 3); assert(*r == 5); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if _LIBCPP_DEBUG >= 1 - { - typedef std::unordered_set<double> C; - typedef C::iterator R; - typedef C::value_type P; - C c; - C c2; - C::const_iterator e = c2.end(); - R r = c.insert(e, P(3.5)); - assert(false); - } -#endif -#endif +#endif // TEST_STD_VER >= 11 } diff --git a/test/std/containers/unord/unord.set/insert_init.pass.cpp b/test/std/containers/unord/unord.set/insert_init.pass.cpp index 27b7290eb341..c106fed107e3 100644 --- a/test/std/containers/unord/unord.set/insert_init.pass.cpp +++ b/test/std/containers/unord/unord.set/insert_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -23,7 +25,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set<int> C; typedef int P; @@ -44,7 +45,6 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C; @@ -66,6 +66,4 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp b/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp index 5d12f225cc6a..45b168d89a5c 100644 --- a/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp +++ b/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp @@ -18,6 +18,7 @@ #include <unordered_set> #include <cassert> +#include "test_macros.h" #include "MoveOnly.h" #include "min_allocator.h" @@ -48,7 +49,7 @@ int main() assert(*r.first == 5.5); assert(r.second); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11 { typedef std::unordered_set<MoveOnly> C; typedef std::pair<C::iterator, bool> R; @@ -74,8 +75,6 @@ int main() assert(*r.first == 5); assert(r.second); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11 { typedef std::unordered_set<double, std::hash<double>, std::equal_to<double>, min_allocator<double>> C; @@ -102,7 +101,6 @@ int main() assert(*r.first == 5.5); assert(r.second); } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>, std::equal_to<MoveOnly>, min_allocator<MoveOnly>> C; @@ -129,6 +127,5 @@ int main() assert(*r.first == 5); assert(r.second); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#endif +#endif // TEST_STD_VER >= 11 } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp index 2db01a21eaac..4f7ccfec652e 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -27,7 +29,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef test_allocator<int> A; typedef std::unordered_set<int, @@ -60,7 +61,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef min_allocator<int> A; typedef std::unordered_set<int, @@ -93,6 +93,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp index 78a376335c3f..bc3658243995 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -28,7 +30,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef test_allocator<int> A; typedef std::unordered_set<int, @@ -164,7 +165,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef min_allocator<int> A; typedef std::unordered_set<int, @@ -210,18 +210,4 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#if _LIBCPP_DEBUG >= 1 - { - std::unordered_set<int> s1 = {1, 2, 3}; - std::unordered_set<int>::iterator i = s1.begin(); - int k = *i; - std::unordered_set<int> s2; - s2 = std::move(s1); - assert(*i == k); - s2.erase(i); - assert(s2.size() == 2); - } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp index eea61c7ab46c..7ba340bf9c3e 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -28,8 +30,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS - { + { typedef std::unordered_set<int, test_hash<std::hash<int> >, test_compare<std::equal_to<int> >, @@ -59,7 +60,6 @@ int main() assert(fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -160,6 +160,4 @@ int main() assert(c.max_load_factor() == 1); } #endif -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp index 95baa3df2852..0ca9b48572d9 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -29,7 +31,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -62,7 +63,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -95,6 +95,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp index 108d67b66b22..45ed588a7bac 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -64,7 +65,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -98,6 +98,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp index 5cb4d499a937..8ace22a5877a 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -65,7 +66,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -100,6 +100,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp index 7c1cbc8667de..4fd50a818fb8 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -30,7 +32,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -66,7 +67,6 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#if TEST_STD_VER >= 11 { typedef std::unordered_set<int, test_hash<std::hash<int> >, @@ -102,6 +102,4 @@ int main() assert(std::fabs(c.load_factor() - (float)c.size()/c.bucket_count()) < FLT_EPSILON); assert(c.max_load_factor() == 1); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp b/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp index 4d2830b3a808..bcd10b0775e4 100644 --- a/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp +++ b/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <unordered_set> // template <class Value, class Hash = hash<Value>, class Pred = equal_to<Value>, @@ -28,7 +30,6 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef int P; typedef test_allocator<int> A; @@ -111,7 +112,6 @@ int main() assert(c0.empty()); } -#if TEST_STD_VER >= 11 { typedef int P; typedef min_allocator<int> A; @@ -153,6 +153,4 @@ int main() assert(c0.empty()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } |