Author: ericwf Date: Sat Apr 15 23:02:01 2017 New Revision: 300415 URL: http://llvm.org/viewvc/llvm-project?rev=300415&view=rev Log: Replace _LIBCPP_HAS_NO_<C++03 feature> with _LIBCPP_CXX03_LANG in <forward_list>
Modified: libcxx/trunk/include/forward_list libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp Modified: libcxx/trunk/include/forward_list URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/forward_list?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/include/forward_list (original) +++ libcxx/trunk/include/forward_list Sat Apr 15 23:02:01 2017 @@ -478,14 +478,14 @@ protected: __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 @@ private: {__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 @@ __forward_list_base<_Tp, _Alloc>::__forw } } -#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 @@ public: >::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 @@ public: >::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 @@ public: _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 @@ public: 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 @@ public: _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 @@ public: _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 @@ public: _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 @@ public: 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 @@ forward_list<_Tp, _Alloc>::forward_list( 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 @@ forward_list<_Tp, _Alloc>::forward_list( } } -#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 @@ forward_list<_Tp, _Alloc>::forward_list( 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 @@ forward_list<_Tp, _Alloc>::operator=(for 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 @@ forward_list<_Tp, _Alloc>::operator=(ini return *this; } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif // _LIBCPP_CXX03_LANG template <class _Tp, class _Alloc> template <class _InputIterator> @@ -1090,7 +1069,7 @@ forward_list<_Tp, _Alloc>::assign(size_t erase_after(__i, __e); } -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#ifndef _LIBCPP_CXX03_LANG template <class _Tp, class _Alloc> inline @@ -1100,11 +1079,6 @@ forward_list<_Tp, _Alloc>::assign(initia 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 @@ forward_list<_Tp, _Alloc>::emplace_front #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 @@ forward_list<_Tp, _Alloc>::push_front(va 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 @@ forward_list<_Tp, _Alloc>::pop_front() __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 @@ forward_list<_Tp, _Alloc>::emplace_after 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 @@ forward_list<_Tp, _Alloc>::insert_after( 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 @@ forward_list<_Tp, _Alloc>::splice_after( } } -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_CXX03_LANG template <class _Tp, class _Alloc> inline _LIBCPP_INLINE_VISIBILITY @@ -1499,7 +1468,7 @@ forward_list<_Tp, _Alloc>::splice_after( splice_after(__p, __x, __f, __l); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_CXX03_LANG template <class _Tp, class _Alloc> void Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*i == 10+n); assert(n == 4); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_move.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(c1.get_allocator() == A()); assert(c0.empty()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*i == 10+n); assert(n == 4); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*i == n); assert(n == 10); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(n == 10); assert(c.get_allocator() == A()); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(c0.empty()); assert(c.get_allocator() == A()); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*next(c.begin(), 3) == Emplaceable(2, 3.5)); assert(distance(c.begin(), c.end()) == 4); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*next(c.begin(), 3) == 1); assert(*next(c.begin(), 4) == 2); } -#endif -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*next(c.begin(), 3) == 2); assert(distance(c.begin(), c.end()) == 4); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp Sat Apr 15 23:02:01 2017 @@ -32,7 +32,7 @@ int main() 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 @@ int main() 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 @@ int main() 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 @@ int main() c.pop_front(); assert(distance(c.begin(), c.end()) == 0); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif } Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp?rev=300415&r1=300414&r2=300415&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp Sat Apr 15 23:02:01 2017 @@ -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 @@ int main() 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 @@ int main() assert(*next(c.begin()) == 1); assert(distance(c.begin(), c.end()) == 2); } -#endif -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits