Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <forward_list>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300415 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/forward_list b/include/forward_list
index 879f2d3c..e4ab41e 100644
--- a/include/forward_list
+++ b/include/forward_list
@@ -478,14 +478,14 @@
__forward_list_base(const allocator_type& __a)
: __before_begin_(__begin_node(), __node_allocator(__a)) {}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
public:
_LIBCPP_INLINE_VISIBILITY
__forward_list_base(__forward_list_base&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value);
_LIBCPP_INLINE_VISIBILITY
__forward_list_base(__forward_list_base&& __x, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
private:
__forward_list_base(const __forward_list_base&);
@@ -539,7 +539,7 @@
{__alloc() = _VSTD::move(__x.__alloc());}
};
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline
@@ -563,7 +563,7 @@
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
__forward_list_base<_Tp, _Alloc>::~__forward_list_base()
@@ -656,32 +656,33 @@
>::type* = nullptr);
forward_list(const forward_list& __x);
forward_list(const forward_list& __x, const allocator_type& __a);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+ forward_list& operator=(const forward_list& __x);
+
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
forward_list(forward_list&& __x)
_NOEXCEPT_(is_nothrow_move_constructible<base>::value)
: base(_VSTD::move(__x)) {}
forward_list(forward_list&& __x, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
forward_list(initializer_list<value_type> __il);
forward_list(initializer_list<value_type> __il, const allocator_type& __a);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- // ~forward_list() = default;
-
- forward_list& operator=(const forward_list& __x);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
_LIBCPP_INLINE_VISIBILITY
forward_list& operator=(forward_list&& __x)
_NOEXCEPT_(
__node_traits::propagate_on_container_move_assignment::value &&
is_nothrow_move_assignable<allocator_type>::value);
-#endif
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
forward_list& operator=(initializer_list<value_type> __il);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+ _LIBCPP_INLINE_VISIBILITY
+ void assign(initializer_list<value_type> __il);
+#endif // _LIBCPP_CXX03_LANG
+
+ // ~forward_list() = default;
template <class _InputIterator>
typename enable_if
@@ -691,10 +692,6 @@
>::type
assign(_InputIterator __f, _InputIterator __l);
void assign(size_type __n, const value_type& __v);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- _LIBCPP_INLINE_VISIBILITY
- void assign(initializer_list<value_type> __il);
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const _NOEXCEPT
@@ -745,27 +742,26 @@
_LIBCPP_INLINE_VISIBILITY
const_reference front() const {return base::__before_begin()->__next_->__value_;}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 14
template <class... _Args> reference emplace_front(_Args&&... __args);
#else
template <class... _Args> void emplace_front(_Args&&... __args);
#endif
-#endif
void push_front(value_type&& __v);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
void push_front(const value_type& __v);
void pop_front();
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class... _Args>
iterator emplace_after(const_iterator __p, _Args&&... __args);
-#endif // _LIBCPP_HAS_NO_VARIADICS
+
iterator insert_after(const_iterator __p, value_type&& __v);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+ iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
+ {return insert_after(__p, __il.begin(), __il.end());}
+#endif // _LIBCPP_CXX03_LANG
iterator insert_after(const_iterator __p, const value_type& __v);
iterator insert_after(const_iterator __p, size_type __n, const value_type& __v);
template <class _InputIterator>
@@ -776,10 +772,6 @@
iterator
>::type
insert_after(const_iterator __p, _InputIterator __f, _InputIterator __l);
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
- iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
- {return insert_after(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
iterator erase_after(const_iterator __p);
iterator erase_after(const_iterator __f, const_iterator __l);
@@ -799,7 +791,7 @@
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT {base::clear();}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void splice_after(const_iterator __p, forward_list&& __x);
_LIBCPP_INLINE_VISIBILITY
@@ -807,7 +799,7 @@
_LIBCPP_INLINE_VISIBILITY
void splice_after(const_iterator __p, forward_list&& __x,
const_iterator __f, const_iterator __l);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
void splice_after(const_iterator __p, forward_list& __x);
void splice_after(const_iterator __p, forward_list& __x, const_iterator __i);
void splice_after(const_iterator __p, forward_list& __x,
@@ -817,14 +809,14 @@
_LIBCPP_INLINE_VISIBILITY
void unique() {unique(__equal_to<value_type>());}
template <class _BinaryPredicate> void unique(_BinaryPredicate __binary_pred);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list&& __x) {merge(__x, __less<value_type>());}
template <class _Compare>
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list&& __x, _Compare __comp)
{merge(__x, _VSTD::move(__comp));}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
_LIBCPP_INLINE_VISIBILITY
void merge(forward_list& __x) {merge(__x, __less<value_type>());}
template <class _Compare> void merge(forward_list& __x, _Compare __comp);
@@ -835,11 +827,11 @@
private:
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
void __move_assign(forward_list& __x, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
void __move_assign(forward_list& __x, false_type);
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Compare>
static
@@ -955,8 +947,19 @@
insert_after(cbefore_begin(), __x.begin(), __x.end());
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+template <class _Tp, class _Alloc>
+forward_list<_Tp, _Alloc>&
+forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
+{
+ if (this != &__x)
+ {
+ base::__copy_assign_alloc(__x);
+ assign(__x.begin(), __x.end());
+ }
+ return *this;
+}
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
const allocator_type& __a)
@@ -969,10 +972,6 @@
}
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp, class _Alloc>
forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il)
{
@@ -987,22 +986,6 @@
insert_after(cbefore_begin(), __il.begin(), __il.end());
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-template <class _Tp, class _Alloc>
-forward_list<_Tp, _Alloc>&
-forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
-{
- if (this != &__x)
- {
- base::__copy_assign_alloc(__x);
- assign(__x.begin(), __x.end());
- }
- return *this;
-}
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
template <class _Tp, class _Alloc>
void
forward_list<_Tp, _Alloc>::__move_assign(forward_list& __x, true_type)
@@ -1040,10 +1023,6 @@
return *this;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
template <class _Tp, class _Alloc>
inline
forward_list<_Tp, _Alloc>&
@@ -1053,7 +1032,7 @@
return *this;
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
template <class _InputIterator>
@@ -1090,7 +1069,7 @@
erase_after(__i, __e);
}
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline
@@ -1100,11 +1079,6 @@
assign(__il.begin(), __il.end());
}
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
-
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
template <class... _Args>
#if _LIBCPP_STD_VER > 14
@@ -1126,8 +1100,6 @@
#endif
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
void
forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
@@ -1140,7 +1112,7 @@
base::__before_begin()->__next_ = __h.release();
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
void
@@ -1165,8 +1137,7 @@
__node_traits::deallocate(__a, __p, 1);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
template <class... _Args>
@@ -1184,8 +1155,6 @@
return iterator(__r->__next_);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
template <class _Tp, class _Alloc>
typename forward_list<_Tp, _Alloc>::iterator
forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
@@ -1200,7 +1169,7 @@
return iterator(__r->__next_);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
typename forward_list<_Tp, _Alloc>::iterator
@@ -1468,7 +1437,7 @@
}
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline _LIBCPP_INLINE_VISIBILITY
@@ -1499,7 +1468,7 @@
splice_after(__p, __x, __f, __l);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
void
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
index d4dda02..69fb6eb 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// void assign(initializer_list<value_type> il);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -42,7 +43,6 @@
assert(*i == 10+n);
assert(n == 4);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -65,6 +65,4 @@
assert(*i == 10+n);
assert(n == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
index 9352848..6111835 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list& operator=(forward_list&& x);
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef test_allocator<T> A;
@@ -159,7 +160,6 @@
assert(c1.get_allocator() == A(10));
assert(c0.empty());
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef min_allocator<T> A;
@@ -194,6 +194,4 @@
assert(c1.get_allocator() == A());
assert(c0.empty());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
index 3d35916..84f1eb9 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list& operator=(initializer_list<value_type> il);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -42,7 +43,6 @@
assert(*i == 10+n);
assert(n == 4);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -65,6 +65,4 @@
assert(*i == 10+n);
assert(n == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
index ac73d14..7575c0e 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -28,7 +29,6 @@
assert(*i == n);
assert(n == 10);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -38,6 +38,4 @@
assert(*i == n);
assert(n == 10);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
index 844be20..cf9cbff 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(initializer_list<value_type> il, const allocator_type& a);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef test_allocator<T> A;
@@ -31,7 +32,6 @@
assert(n == 10);
assert(c.get_allocator() == A(14));
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef min_allocator<T> A;
@@ -43,6 +43,4 @@
assert(n == 10);
assert(c.get_allocator() == A());
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
index a5948b9..92a9e39 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// forward_list(forward_list&& x);
@@ -21,7 +23,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef test_allocator<T> A;
@@ -52,7 +53,6 @@
assert(c0.empty());
assert(c.get_allocator() == A(10));
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef min_allocator<T> A;
@@ -68,6 +68,4 @@
assert(c0.empty());
assert(c.get_allocator() == A());
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
index dd8ea88..8d7c4e9 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// template <class... Args>
@@ -20,7 +22,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef Emplaceable T;
typedef std::forward_list<T> C;
@@ -52,7 +53,6 @@
assert(*next(c.begin(), 3) == Emplaceable(2, 3.5));
assert(distance(c.begin(), c.end()) == 4);
}
-#if TEST_STD_VER >= 11
{
typedef Emplaceable T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -84,6 +84,4 @@
assert(*next(c.begin(), 3) == Emplaceable(2, 3.5));
assert(distance(c.begin(), c.end()) == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
index 15e1a08..90ee0d2 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// iterator insert_after(const_iterator p, initializer_list<value_type> il);
@@ -18,7 +20,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
{
typedef int T;
typedef std::forward_list<T> C;
@@ -44,7 +45,6 @@
assert(*next(c.begin(), 3) == 1);
assert(*next(c.begin(), 4) == 2);
}
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -70,6 +70,4 @@
assert(*next(c.begin(), 3) == 1);
assert(*next(c.begin(), 4) == 2);
}
-#endif
-#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
index 2e21cc7..173ccaa 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// iterator insert_after(const_iterator p, value_type&& v);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef std::forward_list<T> C;
@@ -52,7 +53,6 @@
assert(*next(c.begin(), 3) == 2);
assert(distance(c.begin(), c.end()) == 4);
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -85,6 +85,4 @@
assert(*next(c.begin(), 3) == 2);
assert(distance(c.begin(), c.end()) == 4);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
index d831ceb..545b0e6 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp
@@ -32,7 +32,7 @@
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef std::forward_list<T> C;
@@ -45,8 +45,6 @@
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-#if TEST_STD_VER >= 11
{
typedef int T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -60,7 +58,6 @@
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -73,6 +70,5 @@
c.pop_front();
assert(distance(c.begin(), c.end()) == 0);
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#endif
}
diff --git a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
index dfcd2cf..7fc2b9d 100644
--- a/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
+++ b/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++98, c++03
+
// <forward_list>
// void push_front(value_type&& v);
@@ -19,7 +21,6 @@
int main()
{
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
typedef MoveOnly T;
typedef std::forward_list<T> C;
@@ -32,7 +33,6 @@
assert(*next(c.begin()) == 1);
assert(distance(c.begin(), c.end()) == 2);
}
-#if TEST_STD_VER >= 11
{
typedef MoveOnly T;
typedef std::forward_list<T, min_allocator<T>> C;
@@ -45,6 +45,4 @@
assert(*next(c.begin()) == 1);
assert(distance(c.begin(), c.end()) == 2);
}
-#endif
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}