[libcxx] r300619 - Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::unordered_set and std::unordered_multiset

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 18 15:37:33 PDT 2017


Author: ericwf
Date: Tue Apr 18 17:37:32 2017
New Revision: 300619

URL: http://llvm.org/viewvc/llvm-project?rev=300619&view=rev
Log:
Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in std::unordered_set and std::unordered_multiset

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

Modified: libcxx/trunk/include/unordered_set
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/unordered_set?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/include/unordered_set (original)
+++ libcxx/trunk/include/unordered_set Tue Apr 18 17:37:32 2017
@@ -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, _All
     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, _All
 #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, _All
     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, _All
     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, _All
     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,
     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,
 #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,
     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,
     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,
     return *this;
 }
 
-#endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif  // _LIBCPP_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 template <class _InputIterator>

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/emplace.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/emplace.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/emplace.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/emplace.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/emplace_hint.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/insert_hint_rvalue.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/insert_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/insert_init.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/insert_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/insert_init.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/insert_rvalue.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/emplace.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/emplace.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/emplace.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/emplace.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/emplace_hint.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/emplace_hint.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/emplace_hint.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/emplace_hint.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/insert_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/insert_init.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/insert_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/insert_init.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/insert_rvalue.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }

Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp?rev=300619&r1=300618&r2=300619&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_alloc.pass.cpp Tue Apr 18 17:37:32 2017
@@ -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
 }




More information about the cfe-commits mailing list