Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::unordered_set and std::unordere...
authorEric Fiselier <eric@efcs.ca>
Tue, 18 Apr 2017 22:37:32 +0000 (22:37 +0000)
committerEric Fiselier <eric@efcs.ca>
Tue, 18 Apr 2017 22:37:32 +0000 (22:37 +0000)
llvm-svn: 300619

27 files changed:
libcxx/include/unordered_set
libcxx/test/std/containers/unord/unord.multiset/emplace.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/insert_init.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
libcxx/test/std/containers/unord/unord.set/emplace.pass.cpp
libcxx/test/std/containers/unord/unord.set/emplace_hint.pass.cpp
libcxx/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp
libcxx/test/std/containers/unord/unord.set/insert_init.pass.cpp
libcxx/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp

index fc53c82711091f0a879956ec5f8b914a9f301a71..a14fb0004922558bad15d189ff0470a459f205ea 100644 (file)
@@ -408,13 +408,11 @@ public:
     explicit unordered_set(const allocator_type& __a);
     unordered_set(const unordered_set& __u);
     unordered_set(const unordered_set& __u, const allocator_type& __a);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
     _LIBCPP_INLINE_VISIBILITY
     unordered_set(unordered_set&& __u)
         _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
     unordered_set(unordered_set&& __u, const allocator_type& __a);
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     unordered_set(initializer_list<value_type> __il);
     unordered_set(initializer_list<value_type> __il, size_type __n,
                   const hasher& __hf = hasher(),
@@ -432,7 +430,7 @@ public:
                                   const hasher& __hf, const allocator_type& __a)
         : unordered_set(__il, __n, __hf, key_equal(), __a) {}
 #endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
     // ~unordered_set() = default;
     _LIBCPP_INLINE_VISIBILITY
     unordered_set& operator=(const unordered_set& __u)
@@ -440,15 +438,13 @@ public:
         __table_ = __u.__table_;
         return *this;
     }
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
     _LIBCPP_INLINE_VISIBILITY
     unordered_set& operator=(unordered_set&& __u)
         _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
-#endif
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     _LIBCPP_INLINE_VISIBILITY
     unordered_set& operator=(initializer_list<value_type> __il);
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
 
     _LIBCPP_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
@@ -474,7 +470,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return __table_.end();}
 
-#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
+#ifndef _LIBCPP_CXX03_LANG
     template <class... _Args>
         _LIBCPP_INLINE_VISIBILITY
         pair<iterator, bool> emplace(_Args&&... __args)
@@ -493,51 +489,47 @@ public:
         iterator emplace_hint(const_iterator, _Args&&... __args)
             {return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;}
 #endif
-#endif  // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
-    _LIBCPP_INLINE_VISIBILITY
-    pair<iterator, bool> insert(const value_type& __x)
-        {return __table_.__insert_unique(__x);}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
     _LIBCPP_INLINE_VISIBILITY
     pair<iterator, bool> insert(value_type&& __x)
         {return __table_.__insert_unique(_VSTD::move(__x));}
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     _LIBCPP_INLINE_VISIBILITY
 #if _LIBCPP_DEBUG_LEVEL >= 2
-    iterator insert(const_iterator __p, const value_type& __x)
+    iterator insert(const_iterator __p, value_type&& __x)
         {
             _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
-                "unordered_set::insert(const_iterator, const value_type&) called with an iterator not"
+                "unordered_set::insert(const_iterator, value_type&&) called with an iterator not"
                 " referring to this unordered_set");
-            return insert(__x).first;
+            return insert(_VSTD::move(__x)).first;
         }
 #else
-    iterator insert(const_iterator, const value_type& __x)
-        {return insert(__x).first;}
+    iterator insert(const_iterator, value_type&& __x)
+        {return insert(_VSTD::move(__x)).first;}
 #endif
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+    _LIBCPP_INLINE_VISIBILITY
+    void insert(initializer_list<value_type> __il)
+        {insert(__il.begin(), __il.end());}
+#endif  // _LIBCPP_CXX03_LANG
+    _LIBCPP_INLINE_VISIBILITY
+    pair<iterator, bool> insert(const value_type& __x)
+        {return __table_.__insert_unique(__x);}
+
     _LIBCPP_INLINE_VISIBILITY
 #if _LIBCPP_DEBUG_LEVEL >= 2
-    iterator insert(const_iterator __p, value_type&& __x)
+    iterator insert(const_iterator __p, const value_type& __x)
         {
             _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
-                "unordered_set::insert(const_iterator, value_type&&) called with an iterator not"
+                "unordered_set::insert(const_iterator, const value_type&) called with an iterator not"
                 " referring to this unordered_set");
-            return insert(_VSTD::move(__x)).first;
+            return insert(__x).first;
         }
 #else
-    iterator insert(const_iterator, value_type&& __x)
-        {return insert(_VSTD::move(__x)).first;}
+    iterator insert(const_iterator, const value_type& __x)
+        {return insert(__x).first;}
 #endif
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
     template <class _InputIterator>
         _LIBCPP_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-    _LIBCPP_INLINE_VISIBILITY
-    void insert(initializer_list<value_type> __il)
-        {insert(__il.begin(), __il.end());}
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
 
     _LIBCPP_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __table_.erase(__p);}
@@ -717,7 +709,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
     insert(__u.begin(), __u.end());
 }
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
@@ -752,10 +744,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
 #endif
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         initializer_list<value_type> __il)
@@ -792,10 +780,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
     insert(__il.begin(), __il.end());
 }
 
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_set<_Value, _Hash, _Pred, _Alloc>&
@@ -806,10 +790,6 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u)
     return *this;
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_set<_Value, _Hash, _Pred, _Alloc>&
@@ -820,7 +800,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 template <class _InputIterator>
@@ -949,13 +929,11 @@ public:
     explicit unordered_multiset(const allocator_type& __a);
     unordered_multiset(const unordered_multiset& __u);
     unordered_multiset(const unordered_multiset& __u, const allocator_type& __a);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
     _LIBCPP_INLINE_VISIBILITY
     unordered_multiset(unordered_multiset&& __u)
         _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
     unordered_multiset(unordered_multiset&& __u, const allocator_type& __a);
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     unordered_multiset(initializer_list<value_type> __il);
     unordered_multiset(initializer_list<value_type> __il, size_type __n,
                        const hasher& __hf = hasher(),
@@ -971,7 +949,7 @@ public:
     unordered_multiset(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const allocator_type& __a)
       : unordered_multiset(__il, __n, __hf, key_equal(), __a) {}
 #endif
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
     // ~unordered_multiset() = default;
     _LIBCPP_INLINE_VISIBILITY
     unordered_multiset& operator=(const unordered_multiset& __u)
@@ -979,14 +957,12 @@ public:
         __table_ = __u.__table_;
         return *this;
     }
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
     _LIBCPP_INLINE_VISIBILITY
     unordered_multiset& operator=(unordered_multiset&& __u)
         _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
-#endif
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     unordered_multiset& operator=(initializer_list<value_type> __il);
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
 
     _LIBCPP_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
@@ -1012,7 +988,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return __table_.end();}
 
-#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
+#ifndef _LIBCPP_CXX03_LANG
     template <class... _Args>
         _LIBCPP_INLINE_VISIBILITY
         iterator emplace(_Args&&... __args)
@@ -1021,29 +997,27 @@ public:
         _LIBCPP_INLINE_VISIBILITY
         iterator emplace_hint(const_iterator __p, _Args&&... __args)
             {return __table_.__emplace_hint_multi(__p, _VSTD::forward<_Args>(__args)...);}
-#endif  // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
-    _LIBCPP_INLINE_VISIBILITY
-    iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
     _LIBCPP_INLINE_VISIBILITY
     iterator insert(value_type&& __x) {return __table_.__insert_multi(_VSTD::move(__x));}
-#endif
-    _LIBCPP_INLINE_VISIBILITY
-    iterator insert(const_iterator __p, const value_type& __x)
-        {return __table_.__insert_multi(__p, __x);}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     _LIBCPP_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __x)
         {return __table_.__insert_multi(__p, _VSTD::move(__x));}
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-    template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
-        void insert(_InputIterator __first, _InputIterator __last);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
     _LIBCPP_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
+
+    _LIBCPP_INLINE_VISIBILITY
+    iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
+
+    _LIBCPP_INLINE_VISIBILITY
+    iterator insert(const_iterator __p, const value_type& __x)
+        {return __table_.__insert_multi(__p, __x);}
+
+    template <class _InputIterator>
+        _LIBCPP_INLINE_VISIBILITY
+        void insert(_InputIterator __first, _InputIterator __last);
 
     _LIBCPP_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __table_.erase(__p);}
@@ -1224,7 +1198,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
     insert(__u.begin(), __u.end());
 }
 
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
@@ -1259,10 +1233,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
 #endif
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         initializer_list<value_type> __il)
@@ -1299,10 +1269,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
     insert(__il.begin(), __il.end());
 }
 
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>&
@@ -1314,10 +1280,6 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>&
@@ -1328,7 +1290,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 template <class _InputIterator>
index d8d9e9bc5695784a7b1b4807c900bab6bc49e17e..5d925c8d40a7a1be5adb76e57469b25b2847734f 100644 (file)
@@ -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
 }
index 3756476dc8fc7a97364305617080f3087b70c003..d9bab1f490e6e236d2d835e5ae594c1acbef0402 100644 (file)
@@ -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
 }
index f5026e102c42296b0c24ead2e003b378efd25902..ffe6534b249aa64706cda5184ef68e374bb91a69 100644 (file)
 
 // 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
 }
index 9010cac99caf5b8a982fcdab4c5b5cec927659bc..88661b5699cb72347d465005a6fda203d572690e 100644 (file)
@@ -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
 }
index 04f9e34164ab7e8d165697a74da20ea57eadba92..89394901071f8dfed9ec0961d21e829a862ff9cc 100644 (file)
@@ -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
 }
index 3e42305309fd0d8efd19bcf86ebce6a36425b320..ce664034d1e1aa113fccf78b44342c56ebd20133 100644 (file)
@@ -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
 }
index 658bb93e2b1a40f48b2165a1b6cd95bcd109962b..dfcb63e6e0ebf2342c3ffc1761f4c1e31149e078 100644 (file)
@@ -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
 }
index ced52b5e6b469e8dd87b04f6c9d7080544a2f9ab..df49abe077ca4610d4a3f058ceff07da23682587 100644 (file)
@@ -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
 }
index 845139f98d9cfe7e30c135518fa65fd8a4fa248e..b83507934653cf9417d193679c5824ddfd926e77 100644 (file)
@@ -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
 }
index 4dc78bd261cbe96e81d0adba3c8c322c170871b6..92edfc35b9b18cc34f14e3b2d472108d74a77b73 100644 (file)
@@ -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
 }
index f331208596b7a4333eb5260ebd358b41ab2745cc..877306db662047e72dce6b6221149c88660dac37 100644 (file)
@@ -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
 }
index 17f064f462804ee52546e8a7ca93efce63fca5a0..e77be84630ea345b2cb2fde0473c951ac661ad82 100644 (file)
@@ -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
 }
index bc804b42e22d1fd3933f595a0fc56e9b6a7ab891..fb144d9b1e3fc199e1c383cac4deb65e7649e1ba 100644 (file)
@@ -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
 }
index 19af8065819cc8288b5a901de49c0635684bdb08..c09ad1505cd570318d077c4f74d43c40e4e41007 100644 (file)
@@ -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
 }
index 97f3591d012bd8beb287cccf87981cfc0695bc53..16f9eff196a665082910129e4c2a36b0b48f7bf3 100644 (file)
@@ -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
 }
index da94bc55382f212c19119d6f9a4d34c98bdfecbc..676c395270e9039a80728d4424619710f38c83b2 100644 (file)
 
 // 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
 }
index 27b7290eb341a46fd454777b347bbb497c87a973..c106fed107e3ed00cc71a3072120b18af304535a 100644 (file)
@@ -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
 }
index 5d12f225cc6ab16001628e8d3991b198c29f26dc..45b168d89a5c41249bad8a9e0c7f64536a7c0a18 100644 (file)
@@ -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
 }
index 2db01a21eaac169672b4f131b6cb267ec5da441d..4f7ccfec652eb4a00b331476e7b263f8597633d9 100644 (file)
@@ -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
 }
index 78a376335c3fc86956db8562357991d3703f71d8..bc3658243995e294bc307af049ad419abc39c165 100644 (file)
@@ -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
 }
index eea61c7ab46cf6ac56390703cb28834bd5d57fbc..7ba340bf9c3e7d2272c955d94ceebbc9e097fc61 100644 (file)
@@ -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
 }
index 95baa3df285250b4cd501efd5896adfaa123f5de..0ca9b48572d9c146d8471430a1a095bd2cb472e2 100644 (file)
@@ -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
 }
index 108d67b66b22d581f73922c9db5307f08fbc3315..45ed588a7bac9e77231adef9dc3162939fabaab2 100644 (file)
@@ -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
 }
index 5cb4d499a937ff8d3ddeff65bfc7418e490d3efc..8ace22a5877afc98a87a21a35930062835cc98b9 100644 (file)
@@ -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
 }
index 7c1cbc8667de381a81f791d71fbfb68c6059a1e9..4fd50a818fb81d3b93d6df773fb49b7ed5d93ea1 100644 (file)
@@ -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
 }
index 4d2830b3a808f9c24bb044541ced93772d0ef1c6..bcd10b0775e41e60d3e6bbe882e1f9b829fa3d56 100644 (file)
@@ -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
 }