diff options
Diffstat (limited to 'test/std/containers')
127 files changed, 328 insertions, 613 deletions
| diff --git a/test/std/containers/Emplaceable.h b/test/std/containers/Emplaceable.h index 34dd326203b0..f9319d410d2b 100644 --- a/test/std/containers/Emplaceable.h +++ b/test/std/containers/Emplaceable.h @@ -10,7 +10,10 @@  #ifndef EMPLACEABLE_H  #define EMPLACEABLE_H -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#include <utility> +#include "test_macros.h" + +#if TEST_STD_VER >= 11  class Emplaceable  { @@ -49,6 +52,5 @@ struct hash<Emplaceable>  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES - +#endif  // TEST_STD_VER >= 11  #endif  // EMPLACEABLE_H diff --git a/test/std/containers/associative/map/map.access/index_tuple.pass.cpp b/test/std/containers/associative/map/map.access/index_tuple.pass.cpp index f8fc21f1f2f5..8d27eabdf6a6 100644 --- a/test/std/containers/associative/map/map.access/index_tuple.pass.cpp +++ b/test/std/containers/associative/map/map.access/index_tuple.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -17,17 +19,13 @@  #include <map> -#ifndef _LIBCPP_HAS_NO_VARIADICS  #include <tuple> -#endif  int main()  { -#ifndef _LIBCPP_HAS_NO_VARIADICS      using namespace std;      map<tuple<int,int>, size_t> m;      m[make_tuple(2,3)]=7; -#endif  } diff --git a/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp index 679600662fda..354911b76071 100644 --- a/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp +++ b/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::pair<const int, double> V;      std::map<int, double> m = @@ -45,7 +46,6 @@ int main()      assert(*next(m.begin()) == V(2, 1));      assert(*next(m.begin(), 2) == V(3, 1));      } -#if TEST_STD_VER >= 11      {      typedef std::pair<const int, double> V;      std::map<int, double, std::less<int>, min_allocator<V>> m = @@ -70,6 +70,4 @@ int main()      assert(*next(m.begin()) == V(2, 1));      assert(*next(m.begin(), 2) == V(3, 1));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp b/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp index c55d18f54094..0504b1adc22e 100644 --- a/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp +++ b/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::pair<const int, double> V;      std::map<int, double> m = @@ -41,7 +42,6 @@ int main()      assert(*next(m.begin()) == V(2, 1));      assert(*next(m.begin(), 2) == V(3, 1));      } -#if TEST_STD_VER >= 11      {      typedef std::pair<const int, double> V;      std::map<int, double, std::less<int>, min_allocator<V>> m = @@ -62,6 +62,4 @@ int main()      assert(*next(m.begin()) == V(2, 1));      assert(*next(m.begin(), 2) == V(3, 1));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp b/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp index 3133eb2e0dd6..d9c1fb89854b 100644 --- a/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp +++ b/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::pair<const int, double> V;      typedef test_compare<std::less<int> > C; @@ -42,7 +43,6 @@ int main()      assert(*next(m.begin(), 2) == V(3, 1));      assert(m.key_comp() == C(3));      } -#if TEST_STD_VER >= 11      {      typedef std::pair<const int, double> V;      typedef test_compare<std::less<int> > C; @@ -64,6 +64,4 @@ int main()      assert(*next(m.begin(), 2) == V(3, 1));      assert(m.key_comp() == C(3));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp index d7552b3608eb..70783e625770 100644 --- a/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::pair<const int, double> V;      typedef test_compare<std::less<int> > C; @@ -45,7 +46,6 @@ int main()      assert(m.key_comp() == C(3));      assert(m.get_allocator() == A(6));      } -#if TEST_STD_VER >= 11      {      typedef std::pair<const int, double> V;      typedef test_compare<std::less<int> > C; @@ -69,7 +69,6 @@ int main()      assert(m.key_comp() == C(3));      assert(m.get_allocator() == A());      } -#if TEST_STD_VER > 11      {      typedef std::pair<const int, double> V;      typedef min_allocator<V> A; @@ -94,7 +93,6 @@ int main()      assert(*next(m.begin(), 2) == V(3, 1));      assert(m.get_allocator() == a);      } -#endif      {      typedef std::pair<const int, double> V;      typedef explicit_allocator<V> A; @@ -119,6 +117,4 @@ int main()      assert(m.key_comp() == C(3));      assert(m.get_allocator() == a);      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/map/map.cons/move.pass.cpp b/test/std/containers/associative/map/map.cons/move.pass.cpp index 2d19b88bdda8..dd68f9c39ec8 100644 --- a/test/std/containers/associative/map/map.cons/move.pass.cpp +++ b/test/std/containers/associative/map/map.cons/move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -22,7 +24,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      typedef std::pair<const int, double> V;      {          typedef test_compare<std::less<int> > C; @@ -69,7 +70,6 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#if TEST_STD_VER >= 11      {          typedef test_compare<std::less<int> > C;          typedef min_allocator<V> A; @@ -115,6 +115,4 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp b/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp index 8349f13fdebf..5f7ab8ece9f1 100644 --- a/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp +++ b/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -24,7 +26,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -189,7 +190,6 @@ int main()          }          assert(Counter_base::gConstructed == 0);      } -#if TEST_STD_VER >= 11      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -268,6 +268,4 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/map/map.cons/move_assign.pass.cpp b/test/std/containers/associative/map/map.cons/move_assign.pass.cpp index 09b41d3b130b..8c0ef6e9a5c4 100644 --- a/test/std/containers/associative/map/map.cons/move_assign.pass.cpp +++ b/test/std/containers/associative/map/map.cons/move_assign.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -144,7 +145,6 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#if TEST_STD_VER >= 11      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -185,6 +185,4 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp b/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp index 63d014fe8cc5..3b595fc73d7c 100644 --- a/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp +++ b/test/std/containers/associative/map/map.modifiers/emplace.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -24,7 +26,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::map<int, DefaultOnly> M;          typedef std::pair<M::iterator, bool> R; @@ -92,7 +93,6 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#if TEST_STD_VER >= 11      {          typedef std::map<int, DefaultOnly, std::less<int>, min_allocator<std::pair<const int, DefaultOnly>>> M;          typedef std::pair<M::iterator, bool> R; @@ -160,6 +160,4 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp b/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp index 319a239525ad..7236276a29a4 100644 --- a/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp +++ b/test/std/containers/associative/map/map.modifiers/emplace_hint.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::map<int, DefaultOnly> M;          typedef M::iterator R; @@ -89,7 +90,6 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#if TEST_STD_VER >= 11      {          typedef std::map<int, DefaultOnly, std::less<int>, min_allocator<std::pair<const int, DefaultOnly>>> M;          typedef M::iterator R; @@ -155,6 +155,4 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp b/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp index 9cf3f3dcf74f..de8191a6bb60 100644 --- a/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp +++ b/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class map @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::pair<const int, double> V;      std::map<int, double> m = @@ -43,7 +44,6 @@ int main()      assert(*next(m.begin()) == V(2, 1));      assert(*next(m.begin(), 2) == V(3, 1));      } -#if TEST_STD_VER >= 11      {      typedef std::pair<const int, double> V;      std::map<int, double, std::less<int>, min_allocator<V>> m = @@ -66,6 +66,4 @@ int main()      assert(*next(m.begin()) == V(2, 1));      assert(*next(m.begin(), 2) == V(3, 1));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp index 4c0326d90fe6..ae4ab349d234 100644 --- a/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::multimap<int, double> C;      typedef C::value_type V; @@ -50,7 +51,6 @@ int main()      assert(*++i == V(3, 1.5));      assert(*++i == V(3, 2));      } -#if TEST_STD_VER >= 11      {      typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> C;      typedef C::value_type V; @@ -80,6 +80,4 @@ int main()      assert(*++i == V(3, 1.5));      assert(*++i == V(3, 2));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp index 6f645b63b44c..54b948c3e551 100644 --- a/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::multimap<int, double> C;      typedef C::value_type V; @@ -49,7 +50,6 @@ int main()      assert(*++i == V(3, 1.5));      assert(*++i == V(3, 2));      } -#if TEST_STD_VER >= 11      {      typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> C;      typedef C::value_type V; @@ -78,6 +78,4 @@ int main()      assert(*++i == V(3, 1.5));      assert(*++i == V(3, 2));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp index 6d20d14f4200..a78e1889ac9e 100644 --- a/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef test_compare<std::less<int> > Cmp;      typedef std::multimap<int, double, Cmp> C; @@ -53,7 +54,6 @@ int main()      assert(*++i == V(3, 2));      assert(m.key_comp() == Cmp(4));      } -#if TEST_STD_VER >= 11      {      typedef test_compare<std::less<int> > Cmp;      typedef std::multimap<int, double, Cmp, min_allocator<std::pair<const int, double>>> C; @@ -86,6 +86,4 @@ int main()      assert(*++i == V(3, 2));      assert(m.key_comp() == Cmp(4));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp index 8d12a059b89d..ba6f76e52d65 100644 --- a/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef test_compare<std::less<int> > Cmp;      typedef test_allocator<std::pair<const int, double> > A; @@ -56,8 +57,6 @@ int main()      assert(m.key_comp() == Cmp(4));      assert(m.get_allocator() == A(5));      } -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#if TEST_STD_VER >= 11      {      typedef test_compare<std::less<int> > Cmp;      typedef min_allocator<std::pair<const int, double> > A; @@ -92,7 +91,6 @@ int main()      assert(m.key_comp() == Cmp(4));      assert(m.get_allocator() == A());      } -#if TEST_STD_VER > 11      {      typedef test_compare<std::less<int> > C;      typedef std::pair<const int, double> V; @@ -124,7 +122,6 @@ int main()      assert(*++i == V(3, 2));      assert(m.get_allocator() == a);      } -#endif      {      typedef test_compare<std::less<int> > Cmp;      typedef explicit_allocator<std::pair<const int, double> > A; @@ -159,5 +156,4 @@ int main()      assert(m.key_comp() == Cmp(4));      assert(m.get_allocator() == A{});      } -#endif  } diff --git a/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp index 7edec77365d8..769c709cf203 100644 --- a/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -22,7 +24,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      typedef std::pair<const int, double> V;      {          typedef test_compare<std::less<int> > C; @@ -75,7 +76,6 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#if TEST_STD_VER >= 11      {          typedef test_compare<std::less<int> > C;          typedef min_allocator<V> A; @@ -127,6 +127,4 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp index 6ce7127ea7cf..5882283abe3e 100644 --- a/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -24,7 +26,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -189,7 +190,6 @@ int main()          }          assert(Counter_base::gConstructed == 0);      } -#if TEST_STD_VER >= 11      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -268,6 +268,4 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp b/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp index 924e9ddf1936..24742541571a 100644 --- a/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -144,7 +145,6 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#if TEST_STD_VER >= 11      {          typedef std::pair<MoveOnly, MoveOnly> V;          typedef std::pair<const MoveOnly, MoveOnly> VC; @@ -185,6 +185,4 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp b/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp index 7f5b698fa068..024cc670e814 100644 --- a/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.modifiers/emplace.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::multimap<int, DefaultOnly> M;          typedef M::iterator R; @@ -84,7 +85,6 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#if TEST_STD_VER >= 11      {          typedef std::multimap<int, DefaultOnly, std::less<int>, min_allocator<std::pair<const int, DefaultOnly>>> M;          typedef M::iterator R; @@ -145,6 +145,4 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp b/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp index a6ed318c7598..d5fde83a7b65 100644 --- a/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.modifiers/emplace_hint.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::multimap<int, DefaultOnly> M;          typedef M::iterator R; @@ -89,7 +90,6 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#if TEST_STD_VER >= 11      {          typedef std::multimap<int, DefaultOnly, std::less<int>, min_allocator<std::pair<const int, DefaultOnly>>> M;          typedef M::iterator R; @@ -155,6 +155,4 @@ int main()          assert(m.begin()->first == 2);          assert(m.begin()->second == 3.5);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp b/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp index 89befb3e9971..20e0ba17ef42 100644 --- a/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp +++ b/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <map>  // class multimap @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::multimap<int, double> C;      typedef C::value_type V; @@ -53,7 +54,6 @@ int main()      assert(*++i == V(3, 2));      assert(*++i == V(3, 1.5));      } -#if TEST_STD_VER >= 11      {      typedef std::multimap<int, double, std::less<int>, min_allocator<std::pair<const int, double>>> C;      typedef C::value_type V; @@ -86,6 +86,4 @@ int main()      assert(*++i == V(3, 2));      assert(*++i == V(3, 1.5));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multiset/emplace.pass.cpp b/test/std/containers/associative/multiset/emplace.pass.cpp index 93842a250f8e..7e2628db0daa 100644 --- a/test/std/containers/associative/multiset/emplace.pass.cpp +++ b/test/std/containers/associative/multiset/emplace.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::multiset<DefaultOnly> M;          typedef M::iterator R; @@ -68,7 +69,6 @@ int main()          assert(m.size() == 1);          assert(*r == 2);      } -#if TEST_STD_VER >= 11      {          typedef std::multiset<int, std::less<int>, min_allocator<int>> M;          typedef M::iterator R; @@ -78,6 +78,4 @@ int main()          assert(m.size() == 1);          assert(*r == 2);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multiset/emplace_hint.pass.cpp b/test/std/containers/associative/multiset/emplace_hint.pass.cpp index 48519fd4356a..2b9b92d0bf0a 100644 --- a/test/std/containers/associative/multiset/emplace_hint.pass.cpp +++ b/test/std/containers/associative/multiset/emplace_hint.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::multiset<DefaultOnly> M;          typedef M::iterator R; @@ -68,7 +69,6 @@ int main()          assert(m.size() == 1);          assert(*r == 2);      } -#if TEST_STD_VER >= 11      {          typedef std::multiset<int, std::less<int>, min_allocator<int>> M;          typedef M::iterator R; @@ -78,6 +78,4 @@ int main()          assert(m.size() == 1);          assert(*r == 2);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp b/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp index 590c66801f99..23a65a3ccf54 100644 --- a/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp +++ b/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::multiset<int> C;      typedef C::value_type V; @@ -39,8 +40,6 @@ int main()      assert(*++i == V(8));      assert(*++i == V(10));      } -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#if TEST_STD_VER >= 11      {      typedef std::multiset<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -58,5 +57,4 @@ int main()      assert(*++i == V(8));      assert(*++i == V(10));      } -#endif  } diff --git a/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp b/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp index 0afc8dc87c23..f39fca5c8f38 100644 --- a/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp +++ b/test/std/containers/associative/multiset/insert_iter_rv.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::multiset<MoveOnly> M;          typedef M::iterator R; @@ -46,8 +47,6 @@ int main()          assert(m.size() == 4);          assert(*r == 3);      } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11      {          typedef std::multiset<MoveOnly, std::less<MoveOnly>, min_allocator<MoveOnly>> M;          typedef M::iterator R; @@ -72,5 +71,4 @@ int main()          assert(m.size() == 4);          assert(*r == 3);      } -#endif  } diff --git a/test/std/containers/associative/multiset/insert_rv.pass.cpp b/test/std/containers/associative/multiset/insert_rv.pass.cpp index 3ee464bc5bc7..68d348793c45 100644 --- a/test/std/containers/associative/multiset/insert_rv.pass.cpp +++ b/test/std/containers/associative/multiset/insert_rv.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::multiset<MoveOnly> M;          typedef M::iterator R; @@ -46,8 +47,6 @@ int main()          assert(m.size() == 4);          assert(*r == 3);      } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11      {          typedef std::multiset<MoveOnly, std::less<MoveOnly>, min_allocator<MoveOnly>> M;          typedef M::iterator R; @@ -72,5 +71,4 @@ int main()          assert(m.size() == 4);          assert(*r == 3);      } -#endif  } diff --git a/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp index 2c5318afd73b..915a15fc65ac 100644 --- a/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::multiset<int> C;      typedef C::value_type V; @@ -36,8 +37,6 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#if TEST_STD_VER >= 11      {      typedef std::multiset<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -53,5 +52,4 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#endif  } diff --git a/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp index b3d6066ebeb3..f3ee002dc5f4 100644 --- a/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::multiset<int> C;      typedef C::value_type V; @@ -36,8 +37,6 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#if TEST_STD_VER >= 11      {      typedef std::multiset<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -52,7 +51,6 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#if TEST_STD_VER > 11      {      typedef std::multiset<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -69,6 +67,4 @@ int main()      assert(*++i == V(6));      assert(m.get_allocator() == a);      } -#endif -#endif  } diff --git a/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp index c67657aff8ac..3312ca1383ef 100644 --- a/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -19,7 +21,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      typedef test_compare<std::less<int> > Cmp;      typedef std::multiset<int, Cmp> C;      typedef C::value_type V; @@ -34,5 +35,4 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      assert(m.key_comp() == Cmp(10)); -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp index 83114893a1b2..e495fce1396c 100644 --- a/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      typedef test_compare<std::less<int> > Cmp;      typedef test_allocator<int> A;      typedef std::multiset<int, Cmp, A> C; @@ -37,5 +38,4 @@ int main()      assert(*++i == V(6));      assert(m.key_comp() == Cmp(10));      assert(m.get_allocator() == A(4)); -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp index 5a905cf15a08..2adfb5c37a4f 100644 --- a/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -22,7 +24,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef int V;          typedef test_compare<std::less<int> > C; @@ -76,8 +77,6 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11      {          typedef int V;          V ar[] = @@ -115,5 +114,4 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#endif  } diff --git a/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp index 3da3fc09a45f..29797c3ee6be 100644 --- a/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef MoveOnly V;          typedef test_compare<std::less<MoveOnly> > C; @@ -183,5 +184,4 @@ int main()          }          assert(Counter_base::gConstructed == 0);      } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp b/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp index b0ec4f39451c..e767ff1a47f5 100644 --- a/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp +++ b/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class multiset @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef MoveOnly V;          typedef test_compare<std::less<MoveOnly> > C; @@ -141,8 +142,6 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES -#if TEST_STD_VER >= 11      {          typedef MoveOnly V;          typedef test_compare<std::less<MoveOnly> > C; @@ -182,5 +181,4 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif  } diff --git a/test/std/containers/associative/set/emplace.pass.cpp b/test/std/containers/associative/set/emplace.pass.cpp index 47ef455a996b..5d50a2435fa8 100644 --- a/test/std/containers/associative/set/emplace.pass.cpp +++ b/test/std/containers/associative/set/emplace.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::set<DefaultOnly> M;          typedef std::pair<M::iterator, bool> R; @@ -74,7 +75,6 @@ int main()          assert(m.size() == 1);          assert(*r.first == 2);      } -#if TEST_STD_VER >= 11      {          typedef std::set<int, std::less<int>, min_allocator<int>> M;          typedef std::pair<M::iterator, bool> R; @@ -85,6 +85,4 @@ int main()          assert(m.size() == 1);          assert(*r.first == 2);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/set/emplace_hint.pass.cpp b/test/std/containers/associative/set/emplace_hint.pass.cpp index 036f4d6dfb68..8962c0cbd7ab 100644 --- a/test/std/containers/associative/set/emplace_hint.pass.cpp +++ b/test/std/containers/associative/set/emplace_hint.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::set<DefaultOnly> M;          typedef M::iterator R; @@ -68,7 +69,6 @@ int main()          assert(m.size() == 1);          assert(*r == 2);      } -#if TEST_STD_VER >= 11      {          typedef std::set<int, std::less<int>, min_allocator<int>> M;          typedef M::iterator R; @@ -78,6 +78,4 @@ int main()          assert(m.size() == 1);          assert(*r == 2);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/set/insert_initializer_list.pass.cpp b/test/std/containers/associative/set/insert_initializer_list.pass.cpp index 490d75905adc..3114d48abd40 100644 --- a/test/std/containers/associative/set/insert_initializer_list.pass.cpp +++ b/test/std/containers/associative/set/insert_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::set<int> C;      typedef C::value_type V; @@ -39,7 +40,6 @@ int main()      assert(*++i == V(8));      assert(*++i == V(10));      } -#if TEST_STD_VER >= 11      {      typedef std::set<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -57,6 +57,4 @@ int main()      assert(*++i == V(8));      assert(*++i == V(10));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/set/insert_iter_rv.pass.cpp b/test/std/containers/associative/set/insert_iter_rv.pass.cpp index be827d644d26..9579988c0899 100644 --- a/test/std/containers/associative/set/insert_iter_rv.pass.cpp +++ b/test/std/containers/associative/set/insert_iter_rv.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::set<MoveOnly> M;          typedef M::iterator R; @@ -46,7 +47,6 @@ int main()          assert(m.size() == 3);          assert(*r == 3);      } -#if TEST_STD_VER >= 11      {          typedef std::set<MoveOnly, std::less<MoveOnly>, min_allocator<MoveOnly>> M;          typedef M::iterator R; @@ -71,6 +71,4 @@ int main()          assert(m.size() == 3);          assert(*r == 3);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/set/insert_rv.pass.cpp b/test/std/containers/associative/set/insert_rv.pass.cpp index e528ef347b88..25cbfcb882cd 100644 --- a/test/std/containers/associative/set/insert_rv.pass.cpp +++ b/test/std/containers/associative/set/insert_rv.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -21,7 +23,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef std::set<MoveOnly> M;          typedef std::pair<M::iterator, bool> R; @@ -50,7 +51,6 @@ int main()          assert(m.size() == 3);          assert(*r.first == 3);      } -#if TEST_STD_VER >= 11      {          typedef std::set<MoveOnly, std::less<MoveOnly>, min_allocator<MoveOnly>> M;          typedef std::pair<M::iterator, bool> R; @@ -79,6 +79,4 @@ int main()          assert(m.size() == 3);          assert(*r.first == 3);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp index 70e174a59612..9906a1c0b64d 100644 --- a/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp +++ b/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::set<int> C;      typedef C::value_type V; @@ -36,7 +37,6 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#if TEST_STD_VER >= 11      {      typedef std::set<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -52,6 +52,4 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp b/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp index 5bb5460ddc0d..31521b2f3856 100644 --- a/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp +++ b/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef std::set<int> C;      typedef C::value_type V; @@ -35,7 +36,6 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#if TEST_STD_VER >= 11      {      typedef std::set<int, std::less<int>, min_allocator<int>> C;      typedef C::value_type V; @@ -50,6 +50,4 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp b/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp index a0afa02cf749..ea72b6dc0260 100644 --- a/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp +++ b/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -19,7 +21,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      typedef test_compare<std::less<int> > Cmp;      typedef std::set<int, Cmp> C;      typedef C::value_type V; @@ -34,5 +35,4 @@ int main()      assert(*++i == V(5));      assert(*++i == V(6));      assert(m.key_comp() == Cmp(10)); -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp b/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp index 80d41b0b5df7..f6cb734c3c29 100644 --- a/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -22,7 +24,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS      {      typedef test_compare<std::less<int> > Cmp;      typedef test_allocator<int> A; @@ -41,7 +42,6 @@ int main()      assert(m.key_comp() == Cmp(10));      assert(m.get_allocator() == A(4));      } -#if TEST_STD_VER > 11      {      typedef test_compare<std::less<int> > Cmp;      typedef test_allocator<int> A; @@ -59,6 +59,4 @@ int main()      assert(*++i == V(6));      assert(m.get_allocator() == A(4));      } -#endif -#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS  } diff --git a/test/std/containers/associative/set/set.cons/move.pass.cpp b/test/std/containers/associative/set/set.cons/move.pass.cpp index c836d4550203..dd313e4cd5e3 100644 --- a/test/std/containers/associative/set/set.cons/move.pass.cpp +++ b/test/std/containers/associative/set/set.cons/move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -22,7 +24,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef int V;          typedef test_compare<std::less<int> > C; @@ -70,7 +71,6 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#if TEST_STD_VER >= 11      {          typedef int V;          V ar[] = @@ -102,6 +102,4 @@ int main()          assert(mo.size() == 0);          assert(distance(mo.begin(), mo.end()) == 0);      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp b/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp index ba2adf5bb520..9e1cd816b116 100644 --- a/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp +++ b/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef MoveOnly V;          typedef test_compare<std::less<MoveOnly> > C; @@ -184,5 +185,4 @@ int main()          assert(Counter_base::gConstructed == 0);      } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/associative/set/set.cons/move_assign.pass.cpp b/test/std/containers/associative/set/set.cons/move_assign.pass.cpp index 07cb4153fa4a..7862f7bf7ebc 100644 --- a/test/std/containers/associative/set/set.cons/move_assign.pass.cpp +++ b/test/std/containers/associative/set/set.cons/move_assign.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <set>  // class set @@ -23,7 +25,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      {          typedef MoveOnly V;          typedef test_compare<std::less<MoveOnly> > C; @@ -141,7 +142,6 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#if TEST_STD_VER >= 11      {          typedef MoveOnly V;          typedef test_compare<std::less<MoveOnly> > C; @@ -181,6 +181,4 @@ int main()          assert(m3.key_comp() == C(5));          assert(m1.empty());      } -#endif -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp index b102f117d48f..6210a59c3abe 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_alloc.pass.cpp @@ -15,6 +15,7 @@  #include <queue>  #include <cassert> +#include "test_macros.h"  #include "test_allocator.h"  template <class T> @@ -30,11 +31,11 @@ struct test          : base(comp, c, a) {}      test(const value_compare& comp, const container_type& c,          const test_allocator<int>& a) : base(comp, c, a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test(const value_compare& comp, container_type&& c,           const test_allocator<int>& a) : base(comp, std::move(c), a) {}      test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif      test_allocator<int> get_allocator() {return c.get_allocator();}      using base::c; diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp index 4d99fc14728b..b1d13fb8b9f7 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_comp_alloc.pass.cpp @@ -15,6 +15,7 @@  #include <queue>  #include <cassert> +#include "test_macros.h"  #include "test_allocator.h"  template <class T> @@ -30,11 +31,11 @@ struct test          : base(comp, a) {}      test(const value_compare& comp, const container_type& c,          const test_allocator<int>& a) : base(comp, c, a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test(const value_compare& comp, container_type&& c,           const test_allocator<int>& a) : base(comp, std::move(c), a) {}      test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif      test_allocator<int> get_allocator() {return c.get_allocator();}      using base::c; diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp index 8bdf7db863e7..df255b4cf12a 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons.alloc/ctor_move_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // template <class Alloc> @@ -17,7 +19,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -52,11 +53,9 @@ struct test      using base::c;  }; -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      test<MoveOnly> qo(std::less<MoveOnly>(),                        make<std::vector<MoveOnly, test_allocator<MoveOnly> > >(5),                        test_allocator<MoveOnly>(2)); @@ -64,5 +63,4 @@ int main()      assert(q.size() == 5);      assert(q.c.get_allocator() == test_allocator<MoveOnly>(6));      assert(q.top() == MoveOnly(4)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp index d43e53819975..4b20b265ff34 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // priority_queue& operator=(priority_queue&& q); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,15 +29,12 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::priority_queue<MoveOnly> qo(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));      std::priority_queue<MoveOnly> q;      q = std::move(qo);      assert(q.size() == 5);      assert(q.top() == MoveOnly(4)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp index b61fb88a5a36..719f6d98078f 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_comp_rcontainer.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // explicit priority_queue(const Compare& comp, container_type&& c); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,13 +29,10 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::priority_queue<MoveOnly> q(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));      assert(q.size() == 5);      assert(q.top() == MoveOnly(4)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp index 7abe796e53ef..450dff37c52f 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp_rcont.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // template <class InputIterator> @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      int a[] = {3, 5, 2, 0, 6, 8, 1};      const int n = sizeof(a)/sizeof(a[0]);      std::priority_queue<MoveOnly> q(a+n/2, a+n, @@ -28,5 +29,4 @@ int main()                                      std::vector<MoveOnly>(a, a+n/2));      assert(q.size() == n);      assert(q.top() == MoveOnly(8)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp index aac8403e5922..229ec02fcea1 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // priority_queue(priority_queue&& q); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,14 +29,11 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::priority_queue<MoveOnly> qo(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));      std::priority_queue<MoveOnly> q = std::move(qo);      assert(q.size() == 5);      assert(q.top() == MoveOnly(4)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp index 5dec2b910fb7..e0547d64a014 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // priority_queue() @@ -15,7 +17,6 @@  // This tests a conforming extension -// UNSUPPORTED: c++98, c++03  #include <queue>  #include <cassert> @@ -30,5 +31,5 @@ int main()          typedef std::priority_queue<MoveOnly> C;          static_assert(std::is_nothrow_default_constructible<C>::value, "");      } -#endif // _LIBCPP_VERSION +#endif  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp index 0218992670f2..9c2058d47877 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.cons/move_noexcept.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // priority_queue(priority_queue&&) @@ -15,8 +17,6 @@  // This tests a conforming extension -// UNSUPPORTED: c++98, c++03 -  #include <queue>  #include <cassert> diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp index 4f14e93f5f52..be928fc2ea4c 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.members/emplace.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // priority_queue(); @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::priority_queue<Emplaceable> q;      q.emplace(1, 2.5);      assert(q.top() == Emplaceable(1, 2.5)); @@ -28,5 +29,4 @@ int main()      assert(q.top() == Emplaceable(3, 4.5));      q.emplace(2, 3.5);      assert(q.top() == Emplaceable(3, 4.5)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp b/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp index 4b20a9bf905f..7f48272679b1 100644 --- a/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp +++ b/test/std/containers/container.adaptors/priority.queue/priqueue.members/push_rvalue.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // priority_queue(); @@ -20,7 +22,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::priority_queue<MoveOnly> q;      q.push(1);      assert(q.top() == 1); @@ -28,5 +29,4 @@ int main()      assert(q.top() == 3);      q.push(2);      assert(q.top() == 3); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp index b3ee758182a5..404db124080b 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_alloc.pass.cpp @@ -15,6 +15,7 @@  #include <queue>  #include <cassert> +#include "test_macros.h"  #include "test_allocator.h"  struct test @@ -24,10 +25,10 @@ struct test      explicit test(const test_allocator<int>& a) : base(a) {}      test(const container_type& c, const test_allocator<int>& a) : base(c, a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}      test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif      test_allocator<int> get_allocator() {return c.get_allocator();}  }; diff --git a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp index e4fff91f07c7..06a53fe385d9 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp @@ -16,6 +16,7 @@  #include <cassert>  #include <cstddef> +#include "test_macros.h"  #include "test_allocator.h"  template <class C> @@ -37,10 +38,10 @@ struct test      explicit test(const test_allocator<int>& a) : base(a) {}      test(const container_type& c, const test_allocator<int>& a) : base(c, a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}      test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif      test_allocator<int> get_allocator() {return c.get_allocator();}  }; diff --git a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp index 0163588efa50..243585693739 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rcontainer_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // template <class Alloc> @@ -18,7 +20,6 @@  #include "test_allocator.h"  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -47,13 +48,10 @@ struct test      allocator_type get_allocator() {return this->c.get_allocator();}  }; -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));      assert(q.get_allocator() == test_allocator<MoveOnly>(4));      assert(q.size() == 5); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp index 7237bf271b0c..76428e33fb27 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_rqueue_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // template <class Alloc> @@ -18,7 +20,6 @@  #include "test_allocator.h"  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -47,14 +48,11 @@ struct test      allocator_type get_allocator() {return this->c.get_allocator();}  }; -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));      test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5));      assert(q2.get_allocator() == test_allocator<MoveOnly>(5));      assert(q2.size() == 5); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp index 8dd5d2f64ec3..57e22963e3db 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons/ctor_move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // queue(queue&& q); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,14 +29,11 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));      std::queue<MoveOnly> q2 = std::move(q);      assert(q2.size() == 5);      assert(q.empty()); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp index f72067b0adcc..1b3f25608660 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons/ctor_rcontainer.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // explicit queue(container_type&& c); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,12 +29,9 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));      assert(q.size() == 5); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp index 781d74016128..7518bcc71c08 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // queue() @@ -14,8 +16,6 @@  // This tests a conforming extension -// UNSUPPORTED: c++98, c++03 -  #include <queue>  #include <cassert> @@ -29,5 +29,5 @@ int main()          typedef std::queue<MoveOnly> C;          static_assert(std::is_nothrow_default_constructible<C>::value, "");      } -#endif // _LIBCPP_VERSION +#endif  } diff --git a/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp b/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp index 58c8f9ddfad1..a89fbef8be0d 100644 --- a/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // queue(queue&&) @@ -14,7 +16,6 @@  // This tests a conforming extension -// UNSUPPORTED: c++98, c++03  #include <queue>  #include <cassert> @@ -29,5 +30,5 @@ int main()          typedef std::queue<MoveOnly> C;          static_assert(std::is_nothrow_move_constructible<C>::value, "");      } -#endif // _LIBCPP_VERSION +#endif  } diff --git a/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp b/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp index af1b7e20c338..0932b7d99d8e 100644 --- a/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.defn/assign_move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // queue& operator=(queue&& q); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,15 +29,12 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));      std::queue<MoveOnly> q2;      q2 = std::move(q);      assert(q2.size() == 5);      assert(q.empty()); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp b/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp index d8992821f1f2..2e0a19a7fe02 100644 --- a/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.defn/push_rv.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <queue>  // void push(value_type&& v); @@ -18,7 +20,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::queue<MoveOnly> q;      q.push(MoveOnly(1));      assert(q.size() == 1); @@ -32,5 +33,4 @@ int main()      assert(q.size() == 3);      assert(q.front() == MoveOnly(1));      assert(q.back() == MoveOnly(3)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp index 94899d4f1b54..bac8378ebbbb 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_alloc.pass.cpp @@ -15,6 +15,7 @@  #include <stack>  #include <cassert> +#include "test_macros.h"  #include "test_allocator.h"  struct test @@ -24,10 +25,10 @@ struct test      explicit test(const test_allocator<int>& a) : base(a) {}      test(const container_type& c, const test_allocator<int>& a) : base(c, a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}      test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif      test_allocator<int> get_allocator() {return c.get_allocator();}  }; diff --git a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp index b3cf39207203..237870b2c220 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp @@ -16,6 +16,7 @@  #include <cassert>  #include <cstddef> +#include "test_macros.h"  #include "test_allocator.h"  template <class C> @@ -37,10 +38,10 @@ struct test      explicit test(const test_allocator<int>& a) : base(a) {}      test(const container_type& c, const test_allocator<int>& a) : base(c, a) {} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#if TEST_STD_VER >= 11      test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}      test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif      test_allocator<int> get_allocator() {return c.get_allocator();}  }; diff --git a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp index 374aa996ffe3..b0da1ef8b375 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rcontainer_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // template <class Alloc> @@ -18,7 +20,6 @@  #include "test_allocator.h"  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -47,13 +48,10 @@ struct test      allocator_type get_allocator() {return this->c.get_allocator();}  }; -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));      assert(q.get_allocator() == test_allocator<MoveOnly>(4));      assert(q.size() == 5); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp index 5fa5bd2a8bd2..e75a8a267750 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_rqueue_alloc.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // template <class Alloc> @@ -18,7 +20,6 @@  #include "test_allocator.h"  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -47,14 +48,11 @@ struct test      allocator_type get_allocator() {return this->c.get_allocator();}  }; -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));      test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5));      assert(q2.get_allocator() == test_allocator<MoveOnly>(5));      assert(q2.size() == 5); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp index 44fab41a6c55..d837e3d654a1 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons/ctor_move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // stack(stack&& q); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,14 +29,11 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::stack<MoveOnly> q(make<std::deque<MoveOnly> >(5));      std::stack<MoveOnly> q2 = std::move(q);      assert(q2.size() == 5);      assert(q.empty()); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp index ab08da93831e..01d467460a7a 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons/ctor_rcontainer.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // explicit stack(container_type&& c); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,12 +29,9 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::stack<MoveOnly> q(make<std::deque<MoveOnly> >(5));      assert(q.size() == 5); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp index 2e217c545f9c..03c709ef6442 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // stack() @@ -14,7 +16,6 @@  // This tests a conforming extension -// UNSUPPORTED: c++98, c++03  #include <stack>  #include <cassert> @@ -29,5 +30,5 @@ int main()          typedef std::stack<MoveOnly> C;          static_assert(std::is_nothrow_default_constructible<C>::value, "");      } -#endif // _LIBCPP_VERSION +#endif  } diff --git a/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp b/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp index af6793f465a2..92aef08baf0d 100644 --- a/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // stack(stack&&) @@ -14,8 +16,6 @@  // This tests a conforming extension -// UNSUPPORTED: c++98, c++03 -  #include <stack>  #include <cassert> @@ -29,5 +29,5 @@ int main()          typedef std::stack<MoveOnly> C;          static_assert(std::is_nothrow_move_constructible<C>::value, "");      } -#endif // _LIBCPP_VERSION +#endif  } diff --git a/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp b/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp index 75cbec1c47c8..cbb63462a8d0 100644 --- a/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.defn/assign_move.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // stack& operator=(stack&& q); @@ -16,7 +18,6 @@  #include "MoveOnly.h" -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES  template <class C>  C @@ -28,15 +29,12 @@ make(int n)      return c;  } -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::stack<MoveOnly> q(make<std::deque<MoveOnly> >(5));      std::stack<MoveOnly> q2;      q2 = std::move(q);      assert(q2.size() == 5);      assert(q.empty()); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp b/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp index 67d0ea3385f6..9165f6ecc1bb 100644 --- a/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp +++ b/test/std/containers/container.adaptors/stack/stack.defn/push_rv.pass.cpp @@ -7,6 +7,8 @@  //  //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 +  // <stack>  // void push(value_type&& v); @@ -18,7 +20,6 @@  int main()  { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES      std::stack<MoveOnly> q;      q.push(MoveOnly(1));      assert(q.size() == 1); @@ -29,5 +30,4 @@ int main()      q.push(MoveOnly(3));      assert(q.size() == 3);      assert(q.top() == MoveOnly(3)); -#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES  } diff --git a/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp index dbdccf13b72e..785a5be8b749 100644 --- a/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp +++ b/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp @@ -18,6 +18,21 @@  #include "min_allocator.h"  #include "asan_testing.h" +#ifndef TEST_HAS_NO_EXCEPTIONS +struct Throws { +    Throws() : v_(0) {} +    Throws(int v) : v_(v) {} +    Throws(const Throws  &rhs) : v_(rhs.v_) { if (sThrows) throw 1; } +    Throws(      Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; } +    Throws& operator=(const Throws  &rhs) { v_ = rhs.v_; return *this; } +    Throws& operator=(      Throws &&rhs) { v_ = rhs.v_; return *this; } +    int v_; +    static bool sThrows; +    }; + +bool Throws::sThrows = false; +#endif +  int main()  {      { @@ -72,4 +87,17 @@ int main()      assert(is_contiguous_container_asan_correct(l1));      }  #endif +#ifndef TEST_HAS_NO_EXCEPTIONS +// Test for LWG2853: +// Throws: Nothing unless an exception is thrown by the assignment operator or move assignment operator of T. +    { +    Throws arr[] = {1, 2, 3}; +    std::vector<Throws> v(arr, arr+3); +    Throws::sThrows = true; +    v.erase(v.begin()); +    v.erase(--v.end()); +    v.erase(v.begin()); +    assert(v.size() == 0); +    } +#endif  } diff --git a/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp b/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp index f7fa0dba27e8..2fc4981b6c9f 100644 --- a/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp +++ b/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp @@ -18,6 +18,21 @@  #include "min_allocator.h"  #include "asan_testing.h" +#ifndef TEST_HAS_NO_EXCEPTIONS +struct Throws { +    Throws() : v_(0) {} +    Throws(int v) : v_(v) {} +    Throws(const Throws  &rhs) : v_(rhs.v_) { if (sThrows) throw 1; } +    Throws(      Throws &&rhs) : v_(rhs.v_) { if (sThrows) throw 1; } +    Throws& operator=(const Throws  &rhs) { v_ = rhs.v_; return *this; } +    Throws& operator=(      Throws &&rhs) { v_ = rhs.v_; return *this; } +    int v_; +    static bool sThrows; +    }; + +bool Throws::sThrows = false; +#endif +  int main()  {      int a1[] = {1, 2, 3}; @@ -125,4 +140,17 @@ int main()          assert(is_contiguous_container_asan_correct(outer[1]));      }  #endif +#ifndef TEST_HAS_NO_EXCEPTIONS +// Test for LWG2853: +// Throws: Nothing unless an exception is thrown by the assignment operator or move assignment operator of T. +    { +    Throws arr[] = {1, 2, 3}; +    std::vector<Throws> v(arr, arr+3); +    Throws::sThrows = true; +    v.erase(v.begin(), --v.end()); +    assert(v.size() == 1); +    v.erase(v.begin(), v.end()); +    assert(v.size() == 0); +    } +#endif  } 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  } | 
