From e3e3291f3ab4af96b0403cf6e255c833143ae3f1 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Fri, 12 Aug 2011 21:56:02 +0000 Subject: [PATCH] Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__config | 5 ++ include/algorithm | 12 +++++ include/deque | 12 +++++ include/forward_list | 20 +++++++ include/initializer_list | 4 ++ include/list | 12 +++++ include/map | 53 ++++++++++++------- include/random | 22 ++++++++ include/regex | 14 +++++ include/set | 8 +++ include/string | 18 +++++++ include/unordered_map | 28 ++++++++++ include/unordered_set | 28 ++++++++++ include/valarray | 20 +++++-- include/vector | 24 +++++++++ .../alg.min.max/max_init_list.pass.cpp | 4 +- .../alg.min.max/max_init_list_comp.pass.cpp | 4 +- .../alg.min.max/min_init_list.pass.cpp | 4 +- .../alg.min.max/min_init_list_comp.pass.cpp | 4 +- .../alg.min.max/minmax_init_list.pass.cpp | 4 +- .../minmax_init_list_comp.pass.cpp | 4 +- .../map.cons/assign_initializer_list.pass.cpp | 4 +- .../map/map.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_compare.pass.cpp | 4 +- .../initializer_list_compare_alloc.pass.cpp | 4 +- .../insert_initializer_list.pass.cpp | 4 +- .../assign_initializer_list.pass.cpp | 4 +- .../multimap.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_compare.pass.cpp | 4 +- .../initializer_list_compare_alloc.pass.cpp | 4 +- .../insert_initializer_list.pass.cpp | 4 +- .../multiset/insert_initializer_list.pass.cpp | 4 +- .../assign_initializer_list.pass.cpp | 4 +- .../multiset.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_compare.pass.cpp | 4 +- .../initializer_list_compare_alloc.pass.cpp | 4 +- .../set/insert_initializer_list.pass.cpp | 4 +- .../set.cons/assign_initializer_list.pass.cpp | 4 +- .../set/set.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_compare.pass.cpp | 4 +- .../initializer_list_compare_alloc.pass.cpp | 4 +- .../assign_initializer_list.pass.cpp | 4 +- .../deque.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_alloc.pass.cpp | 4 +- .../op_equal_initializer_list.pass.cpp | 4 +- .../insert_iter_initializer_list.pass.cpp | 4 +- .../forwardlist.cons/assign_init.pass.cpp | 4 +- .../forwardlist.cons/assign_op_init.pass.cpp | 4 +- .../forwardlist.cons/init.pass.cpp | 4 +- .../forwardlist.cons/init_alloc.pass.cpp | 4 +- .../insert_after_init.pass.cpp | 4 +- .../assign_initializer_list.pass.cpp | 4 +- .../list/list.cons/initializer_list.pass.cpp | 4 +- .../list.cons/initializer_list_alloc.pass.cpp | 4 +- .../op_equal_initializer_list.pass.cpp | 4 +- .../insert_iter_initializer_list.pass.cpp | 4 +- .../assign_initializer_list.pass.cpp | 4 +- .../vector.bool/initializer_list.pass.cpp | 4 +- .../initializer_list_alloc.pass.cpp | 4 +- .../insert_iter_initializer_list.pass.cpp | 4 +- .../op_equal_initializer_list.pass.cpp | 4 +- .../assign_initializer_list.pass.cpp | 4 +- .../vector.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_alloc.pass.cpp | 4 +- .../op_equal_initializer_list.pass.cpp | 4 +- .../insert_iter_initializer_list.pass.cpp | 4 +- .../unord.map.cnstr/assign_init.pass.cpp | 4 +- .../unord.map/unord.map.cnstr/init.pass.cpp | 4 +- .../unord.map.cnstr/init_size.pass.cpp | 4 +- .../unord.map.cnstr/init_size_hash.pass.cpp | 4 +- .../init_size_hash_equal.pass.cpp | 4 +- .../init_size_hash_equal_allocator.pass.cpp | 4 +- .../insert_init.pass.cpp | 4 +- .../unord.multimap.cnstr/assign_init.pass.cpp | 4 +- .../unord.multimap.cnstr/init.pass.cpp | 4 +- .../unord.multimap.cnstr/init_size.pass.cpp | 4 +- .../init_size_hash.pass.cpp | 4 +- .../init_size_hash_equal.pass.cpp | 4 +- .../init_size_hash_equal_allocator.pass.cpp | 4 +- .../insert_init.pass.cpp | 4 +- .../unord/unord.multiset/insert_init.pass.cpp | 4 +- .../unord.multiset.cnstr/assign_init.pass.cpp | 4 +- .../unord.multiset.cnstr/init.pass.cpp | 4 +- .../unord.multiset.cnstr/init_size.pass.cpp | 4 +- .../init_size_hash.pass.cpp | 4 +- .../init_size_hash_equal.pass.cpp | 4 +- .../init_size_hash_equal_allocator.pass.cpp | 4 +- .../unord/unord.set/insert_init.pass.cpp | 4 +- .../unord.set.cnstr/assign_init.pass.cpp | 4 +- .../unord.set/unord.set.cnstr/init.pass.cpp | 4 +- .../unord.set.cnstr/init_size.pass.cpp | 4 +- .../unord.set.cnstr/init_size_hash.pass.cpp | 4 +- .../init_size_hash_equal.pass.cpp | 4 +- .../init_size_hash_equal_allocator.pass.cpp | 4 +- .../support.initlist.access/access.pass.cpp | 6 ++- .../support.initlist.cons/default.pass.cpp | 2 + .../support.initlist.range/begin_end.pass.cpp | 6 ++- .../support.initlist/types.pass.cpp | 2 + .../initializer_list_assign.pass.cpp | 4 +- .../valarray.cons/initializer_list.pass.cpp | 4 +- .../ctor_default.pass.cpp | 7 ++- .../ctor_init.pass.cpp | 4 +- .../param_ctor_default.pass.cpp | 4 +- .../param_ctor_init.pass.cpp | 4 +- .../ctor_default.pass.cpp | 2 + .../ctor_init_func.pass.cpp | 4 +- .../param_ctor_init_func.pass.cpp | 4 +- .../ctor_default.pass.cpp | 2 + .../ctor_init_func.pass.cpp | 4 +- .../param_ctor_init_func.pass.cpp | 4 +- .../initializer_list.pass.cpp | 4 +- .../re.tokiter/re.tokiter.cnstr/init.pass.cpp | 4 +- .../re.regex.assign/assign.il.pass.cpp | 4 +- test/re/re.regex/re.regex.assign/il.pass.cpp | 4 +- .../re.regex.construct/il_flg.pass.cpp | 8 +-- .../string.cons/initializer_list.pass.cpp | 4 +- .../initializer_list_assignment.pass.cpp | 4 +- .../string_append/initializer_list.pass.cpp | 4 +- .../string_assign/initializer_list.pass.cpp | 4 +- .../iter_initializer_list.pass.cpp | 4 +- .../initializer_list.pass.cpp | 4 +- .../iter_iter_initializer_list.pass.cpp | 4 +- 122 files changed, 484 insertions(+), 227 deletions(-) diff --git a/include/__config b/include/__config index 2f75ed887..76510f010 100644 --- a/include/__config +++ b/include/__config @@ -160,6 +160,10 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_TRAILING_RETURN #endif +#if !(__has_feature(cxx_generalized_initializers)) +#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#endif + // Objective-C++ features (opt-in) #if __has_feature(objc_arc) #define _LIBCPP_HAS_OBJC_ARC @@ -244,6 +248,7 @@ namespace std { #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS +#define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) #if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) diff --git a/include/algorithm b/include/algorithm index 3e0938fe2..da9d0fe3c 100644 --- a/include/algorithm +++ b/include/algorithm @@ -2233,6 +2233,8 @@ min(const _Tp& __a, const _Tp& __b) return _VSTD::min(__a, __b, __less<_Tp>()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY _Tp @@ -2249,6 +2251,8 @@ min(initializer_list<_Tp> __t) return *_VSTD::min_element(__t.begin(), __t.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // max_element template @@ -2293,6 +2297,8 @@ max(const _Tp& __a, const _Tp& __b) return _VSTD::max(__a, __b, __less<_Tp>()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY _Tp @@ -2309,6 +2315,8 @@ max(initializer_list<_Tp> __t) return *_VSTD::max_element(__t.begin(), __t.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // minmax_element template @@ -2388,6 +2396,8 @@ minmax(const _Tp& __a, const _Tp& __b) return _VSTD::minmax(__a, __b, __less<_Tp>()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY pair<_Tp, _Tp> @@ -2408,6 +2418,8 @@ minmax(initializer_list<_Tp> __t, _Compare __comp) return pair<_Tp, _Tp>(*__p.first, *__p.second); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // random_shuffle // __independent_bits_engine diff --git a/include/deque b/include/deque index a3da80391..69682a165 100644 --- a/include/deque +++ b/include/deque @@ -1204,12 +1204,16 @@ public: typename enable_if<__is_input_iterator<_InputIter>::value>::type* = 0); deque(const deque& __c); deque(const deque& __c, const allocator_type& __a); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS deque(initializer_list __il); deque(initializer_list __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS deque& operator=(const deque& __c); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY deque& operator=(initializer_list __il) {assign(__il); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value); @@ -1227,8 +1231,10 @@ public: void assign(_RAIter __f, _RAIter __l, typename enable_if<__is_random_access_iterator<_RAIter>::value>::type* = 0); void assign(size_type __n, const value_type& __v); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS allocator_type get_allocator() const _NOEXCEPT; @@ -1313,9 +1319,11 @@ public: template iterator insert (const_iterator __p, _BiIter __f, _BiIter __l, typename enable_if<__is_bidirectional_iterator<_BiIter>::value>::type* = 0); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, initializer_list __il) {return insert(__p, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void pop_front(); void pop_back(); iterator erase(const_iterator __p); @@ -1452,6 +1460,8 @@ deque<_Tp, _Allocator>::deque(const deque& __c, const allocator_type& __a) __append(__c.begin(), __c.end()); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template deque<_Tp, _Allocator>::deque(initializer_list __il) { @@ -1465,6 +1475,8 @@ deque<_Tp, _Allocator>::deque(initializer_list __il, const allocator __append(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template deque<_Tp, _Allocator>& deque<_Tp, _Allocator>::operator=(const deque& __c) diff --git a/include/forward_list b/include/forward_list index 6fe931154..0dd6bb241 100644 --- a/include/forward_list +++ b/include/forward_list @@ -580,8 +580,10 @@ public: : 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 __il); forward_list(initializer_list __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~forward_list() = default; @@ -592,7 +594,9 @@ public: __node_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS forward_list& operator=(initializer_list __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template typename enable_if @@ -602,7 +606,9 @@ public: >::type assign(_InputIterator __f, _InputIterator __l); void assign(size_type __n, const value_type& __v); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void assign(initializer_list __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -677,8 +683,10 @@ 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 __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); @@ -843,6 +851,8 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x, #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template forward_list<_Tp, _Alloc>::forward_list(initializer_list __il) { @@ -857,6 +867,8 @@ forward_list<_Tp, _Alloc>::forward_list(initializer_list __il, insert_after(cbefore_begin(), __il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template forward_list<_Tp, _Alloc>& forward_list<_Tp, _Alloc>::operator=(const forward_list& __x) @@ -910,6 +922,8 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x) #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY forward_list<_Tp, _Alloc>& @@ -919,6 +933,8 @@ forward_list<_Tp, _Alloc>::operator=(initializer_list __il) return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template typename enable_if @@ -954,6 +970,8 @@ forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v) erase_after(__i, __e); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY void @@ -962,6 +980,8 @@ forward_list<_Tp, _Alloc>::assign(initializer_list __il) assign(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS diff --git a/include/initializer_list b/include/initializer_list index f1bea94fa..745d3bd78 100644 --- a/include/initializer_list +++ b/include/initializer_list @@ -51,6 +51,8 @@ template const E* end(initializer_list il) noexcept; namespace std // purposefully not versioned { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template class _LIBCPP_VISIBLE initializer_list { @@ -94,6 +96,8 @@ end(initializer_list<_E> __il) _NOEXCEPT return __il.end(); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + } // std #endif // _LIBCPP_INITIALIZER_LIST diff --git a/include/list b/include/list index 79dcb377f..fa515e0bb 100644 --- a/include/list +++ b/include/list @@ -577,8 +577,10 @@ public: list(const list& __c); list(const list& __c, const allocator_type& __a); list& operator=(const list& __c); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS list(initializer_list __il); list(initializer_list __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES list(list&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value); @@ -588,17 +590,21 @@ public: __node_alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable<__node_allocator>::value); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY list& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template void assign(_InpIter __f, _InpIter __l, typename enable_if<__is_input_iterator<_InpIter>::value>::type* = 0); void assign(size_type __n, const value_type& __x); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS allocator_type get_allocator() const _NOEXCEPT; @@ -673,9 +679,11 @@ public: template iterator insert(const_iterator __p, _InpIter __f, _InpIter __l, typename enable_if<__is_input_iterator<_InpIter>::value>::type* = 0); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __p, initializer_list __il) {return insert(__p, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void swap(list& __c) @@ -830,6 +838,8 @@ list<_Tp, _Alloc>::list(const list& __c, const allocator_type& __a) push_back(*__i); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template list<_Tp, _Alloc>::list(initializer_list __il, const allocator_type& __a) : base(__a) @@ -847,6 +857,8 @@ list<_Tp, _Alloc>::list(initializer_list __il) push_back(*__i); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY list<_Tp, _Alloc>& diff --git a/include/map b/include/map index 2bb352376..886aecf2c 100644 --- a/include/map +++ b/include/map @@ -773,6 +773,18 @@ public: map(map&& __m, const allocator_type& __a); + _LIBCPP_INLINE_VISIBILITY + map& operator=(map&& __m) + _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) + { + __tree_ = _VSTD::move(__m.__tree_); + return *this; + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY map(initializer_list __il, const key_compare& __comp = key_compare()) : __tree_(__vc(__comp)) @@ -787,14 +799,6 @@ public: insert(__il.begin(), __il.end()); } - _LIBCPP_INLINE_VISIBILITY - map& operator=(map&& __m) - _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) - { - __tree_ = _VSTD::move(__m.__tree_); - return *this; - } - _LIBCPP_INLINE_VISIBILITY map& operator=(initializer_list __il) { @@ -802,7 +806,7 @@ public: return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY explicit map(const allocator_type& __a) @@ -943,10 +947,14 @@ public: insert(__e.__i_, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);} _LIBCPP_INLINE_VISIBILITY @@ -1522,6 +1530,18 @@ public: multimap(multimap&& __m, const allocator_type& __a); + _LIBCPP_INLINE_VISIBILITY + multimap& operator=(multimap&& __m) + _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) + { + __tree_ = _VSTD::move(__m.__tree_); + return *this; + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY multimap(initializer_list __il, const key_compare& __comp = key_compare()) : __tree_(__vc(__comp)) @@ -1536,21 +1556,14 @@ public: insert(__il.begin(), __il.end()); } - _LIBCPP_INLINE_VISIBILITY - multimap& operator=(multimap&& __m) - _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) - { - __tree_ = _VSTD::move(__m.__tree_); - return *this; - } - _LIBCPP_INLINE_VISIBILITY multimap& operator=(initializer_list __il) { __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY explicit multimap(const allocator_type& __a) @@ -1679,10 +1692,14 @@ public: __tree_.__insert_multi(__e.__i_, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);} _LIBCPP_INLINE_VISIBILITY diff --git a/include/random b/include/random index ace47a16b..ac7b04dbc 100644 --- a/include/random +++ b/include/random @@ -3399,9 +3399,11 @@ public: // constructors _LIBCPP_INLINE_VISIBILITY seed_seq() {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY seed_seq(initializer_list<_Tp> __il) {init(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY @@ -5715,9 +5717,11 @@ public: _LIBCPP_INLINE_VISIBILITY param_type(_InputIterator __f, _InputIterator __l) : __p_(__f, __l) {__init();} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY param_type(initializer_list __wl) : __p_(__wl.begin(), __wl.end()) {__init();} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template param_type(size_t __nw, double __xmin, double __xmax, _UnaryOperation __fw); @@ -5760,9 +5764,11 @@ public: _LIBCPP_INLINE_VISIBILITY discrete_distribution(_InputIterator __f, _InputIterator __l) : __p_(__f, __l) {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY discrete_distribution(initializer_list __wl) : __p_(__wl) {} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY discrete_distribution(size_t __nw, double __xmin, double __xmax, @@ -5942,8 +5948,10 @@ public: template param_type(_InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template param_type(initializer_list __bl, _UnaryOperation __fw); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); @@ -5993,11 +6001,13 @@ public: _InputIteratorW __fW) : __p_(__fB, __lB, __fW) {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY piecewise_constant_distribution(initializer_list __bl, _UnaryOperation __fw) : __p_(__bl, __fw) {} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY @@ -6127,6 +6137,8 @@ piecewise_constant_distribution<_RealType>::param_type::param_type( } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template piecewise_constant_distribution<_RealType>::param_type::param_type( @@ -6150,6 +6162,8 @@ piecewise_constant_distribution<_RealType>::param_type::param_type( } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template piecewise_constant_distribution<_RealType>::param_type::param_type( @@ -6258,8 +6272,10 @@ public: template param_type(_InputIteratorB __fB, _InputIteratorB __lB, _InputIteratorW __fW); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template param_type(initializer_list __bl, _UnaryOperation __fw); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template param_type(size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw); @@ -6309,11 +6325,13 @@ public: _InputIteratorW __fW) : __p_(__fB, __lB, __fW) {} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY piecewise_linear_distribution(initializer_list __bl, _UnaryOperation __fw) : __p_(__bl, __fw) {} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY @@ -6447,6 +6465,8 @@ piecewise_linear_distribution<_RealType>::param_type::param_type( } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template piecewise_linear_distribution<_RealType>::param_type::param_type( @@ -6470,6 +6490,8 @@ piecewise_linear_distribution<_RealType>::param_type::param_type( } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template piecewise_linear_distribution<_RealType>::param_type::param_type( diff --git a/include/regex b/include/regex index 9eef1607e..5e195696f 100644 --- a/include/regex +++ b/include/regex @@ -2478,12 +2478,14 @@ public: : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), __end_(0) {__parse(__first, __last);} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_regex(initializer_list __il, flag_type __f = regex_constants::ECMAScript) : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), __end_(0) {__parse(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~basic_regex() = default; @@ -2492,9 +2494,11 @@ public: _LIBCPP_INLINE_VISIBILITY basic_regex& operator=(const value_type* __p) {return assign(__p);} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_regex& operator=(initializer_list __il) {return assign(__il);} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template _LIBCPP_INLINE_VISIBILITY basic_regex& operator=(const basic_string& __p) @@ -2557,11 +2561,15 @@ public: __parse(__first, __last); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY basic_regex& assign(initializer_list __il, flag_type __f = regex_constants::ECMAScript) {return assign(__il.begin(), __il.end(), __f);} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + // const operations: _LIBCPP_INLINE_VISIBILITY unsigned mark_count() const {return __marked_count_;} @@ -6069,11 +6077,13 @@ public: const regex_type& __re, const vector& __submatches, regex_constants::match_flag_type __m = regex_constants::match_default); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, const regex_type& __re, initializer_list __submatches, regex_constants::match_flag_type __m = regex_constants::match_default); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, @@ -6162,6 +6172,8 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: __init(__a, __b); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b, @@ -6175,6 +6187,8 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: __init(__a, __b); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: diff --git a/include/set b/include/set index 9248fd79b..fe3d38276 100644 --- a/include/set +++ b/include/set @@ -437,6 +437,7 @@ public: set(set&& __s, const allocator_type& __a); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY set(initializer_list __il, const value_compare& __comp = value_compare()) : __tree_(__comp) @@ -458,6 +459,7 @@ public: __tree_.__assign_unique(__il.begin(), __il.end()); return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -542,9 +544,11 @@ public: __tree_.__insert_unique(__e, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p);} @@ -771,6 +775,7 @@ public: multiset(multiset&& __s, const allocator_type& __a); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY multiset(initializer_list __il, const value_compare& __comp = value_compare()) : __tree_(__comp) @@ -792,6 +797,7 @@ public: __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -876,9 +882,11 @@ public: __tree_.__insert_multi(__e, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p);} diff --git a/include/string b/include/string index 8d48e0af7..7fdf0d890 100644 --- a/include/string +++ b/include/string @@ -1150,10 +1150,12 @@ public: template _LIBCPP_INLINE_VISIBILITY basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string(initializer_list __il); _LIBCPP_INLINE_VISIBILITY basic_string(initializer_list __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS ~basic_string(); @@ -1166,8 +1168,10 @@ public: #endif _LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);} basic_string& operator=(value_type __c); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& operator=(initializer_list __il) {return assign(__il.begin(), __il.size());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_DEBUG _LIBCPP_INLINE_VISIBILITY @@ -1240,7 +1244,9 @@ public: _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const basic_string& __str) {return append(__str);} _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const_pointer __s) {return append(__s);} _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(value_type __c) {push_back(__c); return *this;} +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list __il) {return append(__il);} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& append(const basic_string& __str); @@ -1263,8 +1269,10 @@ public: basic_string& >::type append(_ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& append(initializer_list __il) {return append(__il.begin(), __il.size());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void push_back(value_type __c); _LIBCPP_INLINE_VISIBILITY @@ -1300,8 +1308,10 @@ public: basic_string& >::type assign(_ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& assign(initializer_list __il) {return assign(__il.begin(), __il.size());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& insert(size_type __pos1, const basic_string& __str); @@ -1327,9 +1337,11 @@ public: iterator >::type insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __pos, initializer_list __il) {return insert(__pos, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS basic_string& erase(size_type __pos = 0, size_type __n = npos); _LIBCPP_INLINE_VISIBILITY @@ -1358,9 +1370,11 @@ public: basic_string& >::type replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list __il) {return replace(__i1, __i2, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS size_type copy(pointer __s, size_type __n, size_type __pos = 0) const; _LIBCPP_INLINE_VISIBILITY @@ -1942,6 +1956,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, __init(__first, __last); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template _LIBCPP_INLINE_VISIBILITY inline basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list __il) @@ -1957,6 +1973,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list basic_string<_CharT, _Traits, _Allocator>::~basic_string() { diff --git a/include/unordered_map b/include/unordered_map index bf6b688a6..cb30fc87d 100644 --- a/include/unordered_map +++ b/include/unordered_map @@ -684,12 +684,14 @@ public: _NOEXCEPT_(is_nothrow_move_constructible<__table>::value); unordered_map(unordered_map&& __u, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_map(initializer_list __il); unordered_map(initializer_list __il, size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal()); unordered_map(initializer_list __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_map() = default; _LIBCPP_INLINE_VISIBILITY unordered_map& operator=(const unordered_map& __u) @@ -701,7 +703,9 @@ public: unordered_map& operator=(unordered_map&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_map& operator=(initializer_list __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -788,9 +792,11 @@ public: #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);} @@ -986,6 +992,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( initializer_list __il) @@ -1013,6 +1021,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map( insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template @@ -1027,6 +1037,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u) #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& @@ -1037,6 +1049,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=( return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -1292,6 +1306,7 @@ public: _NOEXCEPT_(is_nothrow_move_constructible<__table>::value); unordered_multimap(unordered_multimap&& __u, const allocator_type& __a); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_multimap(initializer_list __il); unordered_multimap(initializer_list __il, size_type __n, const hasher& __hf = hasher(), @@ -1299,6 +1314,7 @@ public: unordered_multimap(initializer_list __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_multimap() = default; _LIBCPP_INLINE_VISIBILITY unordered_multimap& operator=(const unordered_multimap& __u) @@ -1310,7 +1326,9 @@ public: unordered_multimap& operator=(unordered_multimap&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_multimap& operator=(initializer_list __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -1393,9 +1411,11 @@ public: #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);} @@ -1582,6 +1602,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( initializer_list __il) @@ -1609,6 +1631,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap( insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template @@ -1623,6 +1647,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multima #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& @@ -1633,6 +1659,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=( return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES #ifndef _LIBCPP_HAS_NO_VARIADICS diff --git a/include/unordered_set b/include/unordered_set index 2ef543348..d7615fa05 100644 --- a/include/unordered_set +++ b/include/unordered_set @@ -365,6 +365,7 @@ public: _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 __il); unordered_set(initializer_list __il, size_type __n, const hasher& __hf = hasher(), @@ -372,6 +373,7 @@ public: unordered_set(initializer_list __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_set() = default; _LIBCPP_INLINE_VISIBILITY unordered_set& operator=(const unordered_set& __u) @@ -383,7 +385,9 @@ public: unordered_set& operator=(unordered_set&& __u) _NOEXCEPT_(is_nothrow_move_assignable<__table>::value); #endif +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS unordered_set& operator=(initializer_list __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -437,9 +441,11 @@ public: #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p);} @@ -607,6 +613,8 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( initializer_list __il) @@ -634,6 +642,8 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set( insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template @@ -648,6 +658,8 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u) #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY unordered_set<_Value, _Hash, _Pred, _Alloc>& @@ -658,6 +670,8 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=( return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template inline _LIBCPP_INLINE_VISIBILITY @@ -763,6 +777,7 @@ public: _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 __il); unordered_multiset(initializer_list __il, size_type __n, const hasher& __hf = hasher(), @@ -770,6 +785,7 @@ public: unordered_multiset(initializer_list __il, size_type __n, const hasher& __hf, const key_equal& __eql, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS // ~unordered_multiset() = default; _LIBCPP_INLINE_VISIBILITY unordered_multiset& operator=(const unordered_multiset& __u) @@ -781,7 +797,9 @@ public: 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 __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -833,9 +851,11 @@ public: #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template void insert(_InputIterator __first, _InputIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void insert(initializer_list __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __table_.erase(__p);} @@ -1004,6 +1024,8 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( initializer_list __il) @@ -1031,6 +1053,8 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset( insert(__il.begin(), __il.end()); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template @@ -1046,6 +1070,8 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=( #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline unordered_multiset<_Value, _Hash, _Pred, _Alloc>& @@ -1056,6 +1082,8 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=( return *this; } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template template inline _LIBCPP_INLINE_VISIBILITY diff --git a/include/valarray b/include/valarray index d7a173cf6..62c1c66c3 100644 --- a/include/valarray +++ b/include/valarray @@ -798,8 +798,10 @@ public: valarray(const valarray& __v); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray(valarray&& __v); - valarray(initializer_list __il); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + valarray(initializer_list __il); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS valarray(const slice_array& __sa); valarray(const gslice_array& __ga); valarray(const mask_array& __ma); @@ -810,8 +812,10 @@ public: valarray& operator=(const valarray& __v); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES valarray& operator=(valarray&& __v); - valarray& operator=(initializer_list); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + valarray& operator=(initializer_list); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS valarray& operator=(const value_type& __x); valarray& operator=(const slice_array& __sa); valarray& operator=(const gslice_array& __ga); @@ -2708,6 +2712,10 @@ valarray<_Tp>::valarray(valarray&& __v) __v.__begin_ = __v.__end_ = nullptr; } +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template valarray<_Tp>::valarray(initializer_list __il) : __begin_(0), @@ -2734,7 +2742,7 @@ valarray<_Tp>::valarray(initializer_list __il) } } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template valarray<_Tp>::valarray(const slice_array& __sa) @@ -2884,6 +2892,10 @@ valarray<_Tp>::operator=(valarray&& __v) return *this; } +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template inline _LIBCPP_INLINE_VISIBILITY valarray<_Tp>& @@ -2895,7 +2907,7 @@ valarray<_Tp>::operator=(initializer_list __il) return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template inline _LIBCPP_INLINE_VISIBILITY diff --git a/include/vector b/include/vector index 8d9b42167..43a67d8f2 100644 --- a/include/vector +++ b/include/vector @@ -532,10 +532,12 @@ public: template vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a, typename enable_if<__is_forward_iterator<_ForwardIterator>::value>::type* = 0); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY vector(initializer_list __il); _LIBCPP_INLINE_VISIBILITY vector(initializer_list __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifdef _LIBCPP_DEBUG _LIBCPP_INLINE_VISIBILITY ~vector() {__invalidate_all_iterators();} @@ -557,9 +559,11 @@ public: __alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable::value); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY vector& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template typename enable_if @@ -578,9 +582,11 @@ public: assign(_ForwardIterator __first, _ForwardIterator __last); void assign(size_type __n, const_reference __u); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT @@ -681,9 +687,11 @@ public: iterator >::type insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __position, initializer_list __il) {return insert(__position, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position); iterator erase(const_iterator __first, const_iterator __last); @@ -1056,6 +1064,8 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const allocator_type& __a) } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template _LIBCPP_INLINE_VISIBILITY inline vector<_Tp, _Allocator>::vector(initializer_list __il) @@ -1079,6 +1089,8 @@ vector<_Tp, _Allocator>::vector(initializer_list __il, const allocat } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template _LIBCPP_INLINE_VISIBILITY inline vector<_Tp, _Allocator>& @@ -1854,8 +1866,10 @@ public: vector(const vector& __v); vector(const vector& __v, const allocator_type& __a); vector& operator=(const vector& __v); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS vector(initializer_list __il); vector(initializer_list __il, const allocator_type& __a); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY @@ -1868,9 +1882,11 @@ public: __alloc_traits::propagate_on_container_move_assignment::value && is_nothrow_move_assignable::value); #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY vector& operator=(initializer_list __il) {assign(__il.begin(), __il.end()); return *this;} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS template typename enable_if @@ -1889,9 +1905,11 @@ public: assign(_ForwardIterator __first, _ForwardIterator __last); void assign(size_type __n, const value_type& __x); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY void assign(initializer_list __il) {assign(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY allocator_type get_allocator() const _NOEXCEPT {return allocator_type(this->__alloc());} @@ -1979,9 +1997,11 @@ public: iterator >::type insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last); +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator insert(const_iterator __position, initializer_list __il) {return insert(__position, __il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position); iterator erase(const_iterator __first, const_iterator __last); @@ -2351,6 +2371,8 @@ vector::vector(_ForwardIterator __first, _ForwardIterator __la } } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template vector::vector(initializer_list __il) : __begin_(0), @@ -2379,6 +2401,8 @@ vector::vector(initializer_list __il, const alloca } } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + template vector::~vector() { diff --git a/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp index 139dc3bcb..0b28c8324 100644 --- a/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS int i = std::max({2, 3, 1}); assert(i == 3); i = std::max({2, 1, 3}); @@ -31,5 +31,5 @@ int main() assert(i == 3); i = std::max({1, 3, 2}); assert(i == 3); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp index 153ef9875..62484b2df 100644 --- a/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS int i = std::max({2, 3, 1}, std::greater()); assert(i == 1); i = std::max({2, 1, 3}, std::greater()); @@ -32,5 +32,5 @@ int main() assert(i == 1); i = std::max({1, 3, 2}, std::greater()); assert(i == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp index 6f9970f55..33ac19559 100644 --- a/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS int i = std::min({2, 3, 1}); assert(i == 1); i = std::min({2, 1, 3}); @@ -31,5 +31,5 @@ int main() assert(i == 1); i = std::min({1, 3, 2}); assert(i == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp index 42ef19f24..c20b15b30 100644 --- a/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS int i = std::min({2, 3, 1}, std::greater()); assert(i == 3); i = std::min({2, 1, 3}, std::greater()); @@ -32,5 +32,5 @@ int main() assert(i == 3); i = std::min({1, 3, 2}, std::greater()); assert(i == 3); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp index b7881896a..57e0737d5 100644 --- a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp @@ -18,12 +18,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS assert((std::minmax({1, 2, 3}) == std::pair(1, 3))); assert((std::minmax({1, 3, 2}) == std::pair(1, 3))); assert((std::minmax({2, 1, 3}) == std::pair(1, 3))); assert((std::minmax({2, 3, 1}) == std::pair(1, 3))); assert((std::minmax({3, 1, 2}) == std::pair(1, 3))); assert((std::minmax({3, 2, 1}) == std::pair(1, 3))); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp index 564992b23..9288ccc9f 100644 --- a/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp +++ b/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp @@ -19,12 +19,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS assert((std::minmax({1, 2, 3}, std::greater()) == std::pair(3, 1))); assert((std::minmax({1, 3, 2}, std::greater()) == std::pair(3, 1))); assert((std::minmax({2, 1, 3}, std::greater()) == std::pair(3, 1))); assert((std::minmax({2, 3, 1}, std::greater()) == std::pair(3, 1))); assert((std::minmax({3, 1, 2}, std::greater()) == std::pair(3, 1))); assert((std::minmax({3, 2, 1}, std::greater()) == std::pair(3, 1))); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp index 55ba9eb65..2fdf5b294 100644 --- a/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/map/map.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::pair V; std::map m = { @@ -41,5 +41,5 @@ int main() assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/map/map.cons/initializer_list.pass.cpp b/test/containers/associative/map/map.cons/initializer_list.pass.cpp index 156522f16..4acf2dcab 100644 --- a/test/containers/associative/map/map.cons/initializer_list.pass.cpp +++ b/test/containers/associative/map/map.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::pair V; std::map m = { @@ -37,5 +37,5 @@ int main() assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp b/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp index 4579d91fd..723a03f49 100644 --- a/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/map/map.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::pair V; typedef test_compare > C; std::map m({ @@ -39,5 +39,5 @@ int main() assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); assert(m.key_comp() == C(3)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp index 99e180322..f6300de20 100644 --- a/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::pair V; typedef test_compare > C; typedef test_allocator > A; @@ -42,5 +42,5 @@ int main() assert(*next(m.begin(), 2) == V(3, 1)); assert(m.key_comp() == C(3)); assert(m.get_allocator() == A(6)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp b/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp index 29094cbba..66714d53e 100644 --- a/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp +++ b/test/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::pair V; std::map m = { @@ -39,5 +39,5 @@ int main() assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp b/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp index b463ba6c3..73e8f24ff 100644 --- a/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::multimap C; typedef C::value_type V; C m = {{20, 1}}; @@ -46,5 +46,5 @@ int main() assert(*++i == V(3, 1)); assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp b/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp index 1e49925e8..7683506f6 100644 --- a/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::multimap C; typedef C::value_type V; C m = @@ -45,5 +45,5 @@ int main() assert(*++i == V(3, 1)); assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp b/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp index 7127c2433..6d7f546ea 100644 --- a/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef test_compare > Cmp; typedef std::multimap C; typedef C::value_type V; @@ -50,5 +50,5 @@ int main() assert(*++i == V(3, 1.5)); assert(*++i == V(3, 2)); assert(m.key_comp() == Cmp(4)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp index b77d0e18a..47b48f1ef 100644 --- a/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef test_compare > Cmp; typedef test_allocator > A; typedef std::multimap C; @@ -53,5 +53,5 @@ int main() assert(*++i == V(3, 2)); assert(m.key_comp() == Cmp(4)); assert(m.get_allocator() == A(5)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp b/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp index 259a239c5..26a9cb8cf 100644 --- a/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp +++ b/test/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::multimap C; typedef C::value_type V; C m = @@ -49,5 +49,5 @@ int main() assert(*++i == V(3, 1)); assert(*++i == V(3, 2)); assert(*++i == V(3, 1.5)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multiset/insert_initializer_list.pass.cpp b/test/containers/associative/multiset/insert_initializer_list.pass.cpp index 78cec2651..4f5691b09 100644 --- a/test/containers/associative/multiset/insert_initializer_list.pass.cpp +++ b/test/containers/associative/multiset/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::multiset C; typedef C::value_type V; C m = {10, 8}; @@ -34,5 +34,5 @@ int main() assert(*++i == V(6)); assert(*++i == V(8)); assert(*++i == V(10)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp b/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp index 5f263c77d..a6834afe0 100644 --- a/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::multiset C; typedef C::value_type V; C m = {10, 8}; @@ -32,5 +32,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp b/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp index 11204e0d0..4ee2b4daa 100644 --- a/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::multiset C; typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; @@ -31,5 +31,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp b/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp index 80f6d882f..c67657aff 100644 --- a/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef test_compare > Cmp; typedef std::multiset C; typedef C::value_type V; @@ -34,5 +34,5 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp index 4f580565d..d0eebadc6 100644 --- a/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef test_compare > Cmp; typedef test_allocator A; typedef std::multiset C; @@ -37,5 +37,5 @@ int main() assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); assert(m.get_allocator() == A(4)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/set/insert_initializer_list.pass.cpp b/test/containers/associative/set/insert_initializer_list.pass.cpp index f62954b97..e9245cd46 100644 --- a/test/containers/associative/set/insert_initializer_list.pass.cpp +++ b/test/containers/associative/set/insert_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::set C; typedef C::value_type V; C m = {10, 8}; @@ -34,5 +34,5 @@ int main() assert(*++i == V(6)); assert(*++i == V(8)); assert(*++i == V(10)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp index 5decf77e7..b37e0d474 100644 --- a/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp +++ b/test/containers/associative/set/set.cons/assign_initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::set C; typedef C::value_type V; C m = {10, 8}; @@ -32,5 +32,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/set/set.cons/initializer_list.pass.cpp b/test/containers/associative/set/set.cons/initializer_list.pass.cpp index 406b64a94..badb107ab 100644 --- a/test/containers/associative/set/set.cons/initializer_list.pass.cpp +++ b/test/containers/associative/set/set.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef std::set C; typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; @@ -31,5 +31,5 @@ int main() assert(*++i == V(4)); assert(*++i == V(5)); assert(*++i == V(6)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp b/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp index 168a2d3a3..a0afa02cf 100644 --- a/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp +++ b/test/containers/associative/set/set.cons/initializer_list_compare.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef test_compare > Cmp; typedef std::set C; typedef C::value_type V; @@ -34,5 +34,5 @@ int main() assert(*++i == V(5)); assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp b/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp index f5090a6b0..c180915ae 100644 --- a/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp +++ b/test/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS typedef test_compare > Cmp; typedef test_allocator A; typedef std::set C; @@ -37,5 +37,5 @@ int main() assert(*++i == V(6)); assert(m.key_comp() == Cmp(10)); assert(m.get_allocator() == A(4)); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp index 137b4692b..9788c6f00 100644 --- a/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::deque d; d.assign({3, 4, 5, 6}); assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp b/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp index 28f66dc5b..268190991 100644 --- a/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::deque d = {3, 4, 5, 6}; assert(d.size() == 4); assert(d[0] == 3); assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp index c9671242d..0b5fc0208 100644 --- a/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::deque> d({3, 4, 5, 6}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -26,5 +26,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp index 7e5a1dbb8..7ba826b92 100644 --- a/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::deque d; d = {3, 4, 5, 6}; assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp index fd39f9f7f..7696553f1 100644 --- a/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/deque/deque.modifiers/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::deque d(10, 1); std::deque::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6}); assert(d.size() == 14); @@ -35,5 +35,5 @@ int main() assert(d[11] == 1); assert(d[12] == 1); assert(d[13] == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp index 2ced2c4e4..d79c50321 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/assign_init.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; typedef std::forward_list C; @@ -40,5 +40,5 @@ int main() assert(*i == 10+n); assert(n == 4); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp index 0ac904e7a..b880bc2bc 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/assign_op_init.pass.cpp @@ -17,7 +17,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; typedef std::forward_list C; @@ -40,5 +40,5 @@ int main() assert(*i == 10+n); assert(n == 4); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp index 7e9c3d443..503e97bc4 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/init.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; typedef std::forward_list C; @@ -26,5 +26,5 @@ int main() assert(*i == n); assert(n == 10); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp index 01333f664..cd36b44b4 100644 --- a/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.cons/init_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; typedef test_allocator A; @@ -30,5 +30,5 @@ int main() assert(n == 10); assert(c.get_allocator() == A(14)); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp b/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp index a43d9b976..eb8b8e1fe 100644 --- a/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp +++ b/test/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; typedef std::forward_list C; @@ -42,5 +42,5 @@ int main() assert(*next(c.begin(), 3) == 1); assert(*next(c.begin(), 4) == 2); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp index ef882d7af..9721ad2b1 100644 --- a/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.cons/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::list d; d.assign({3, 4, 5, 6}); assert(d.size() == 4); @@ -25,5 +25,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/list/list.cons/initializer_list.pass.cpp b/test/containers/sequences/list/list.cons/initializer_list.pass.cpp index dfde85779..d111a25ef 100644 --- a/test/containers/sequences/list/list.cons/initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.cons/initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::list d = {3, 4, 5, 6}; assert(d.size() == 4); std::list::iterator i = d.begin(); @@ -24,5 +24,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp index 1816119be..7f302edbc 100644 --- a/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/list/list.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::list> d({3, 4, 5, 6}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -27,5 +27,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp index 2002f5507..a744f0fe4 100644 --- a/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::list d; d = {3, 4, 5, 6}; assert(d.size() == 4); @@ -25,5 +25,5 @@ int main() assert(*i++ == 4); assert(*i++ == 5); assert(*i++ == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp index 142da8b4a..d82dbccf6 100644 --- a/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/list/list.modifiers/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::list d(10, 1); std::list::iterator i = d.insert(next(d.cbegin(), 2), {3, 4, 5, 6}); assert(d.size() == 14); @@ -36,5 +36,5 @@ int main() assert(*i++ == 1); assert(*i++ == 1); assert(*i++ == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp b/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp index 03421cda8..14da56134 100644 --- a/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d; d.assign({true, false, false, true}); assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector.bool/initializer_list.pass.cpp b/test/containers/sequences/vector.bool/initializer_list.pass.cpp index 8a7e02a8c..04d94e077 100644 --- a/test/containers/sequences/vector.bool/initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d = {true, false, false, true}; assert(d.size() == 4); assert(d[0] == true); assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp b/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp index 58068e693..f8b2ee6b7 100644 --- a/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/vector.bool/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector> d({true, false, false, true}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -26,5 +26,5 @@ int main() assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp index 3af4458c6..c0b4334fa 100644 --- a/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d(10, true); std::vector::iterator i = d.insert(d.cbegin() + 2, {false, true, true, false}); assert(d.size() == 14); @@ -35,5 +35,5 @@ int main() assert(d[11] == true); assert(d[12] == true); assert(d[13] == true); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp b/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp index 9e67edae1..ca786a624 100644 --- a/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/vector.bool/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d; d = {true, false, false, true}; assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == false); assert(d[2] == false); assert(d[3] == true); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp index baa46fc99..55080561a 100644 --- a/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/assign_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d; d.assign({3, 4, 5, 6}); assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp index 282b13dfa..5c33ad7d1 100644 --- a/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d = {3, 4, 5, 6}; assert(d.size() == 4); assert(d[0] == 3); assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp b/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp index a8a88ba03..f99352627 100644 --- a/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/initializer_list_alloc.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector> d({3, 4, 5, 6}, test_allocator(3)); assert(d.get_allocator() == test_allocator(3)); assert(d.size() == 4); @@ -26,5 +26,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp index 77fae4ef5..8b28fe584 100644 --- a/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.cons/op_equal_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d; d = {3, 4, 5, 6}; assert(d.size() == 4); @@ -24,5 +24,5 @@ int main() assert(d[1] == 4); assert(d[2] == 5); assert(d[3] == 6); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp b/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp index 589cd2219..65247bf79 100644 --- a/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp +++ b/test/containers/sequences/vector/vector.modifiers/insert_iter_initializer_list.pass.cpp @@ -16,7 +16,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::vector d(10, 1); std::vector::iterator i = d.insert(d.cbegin() + 2, {3, 4, 5, 6}); assert(d.size() == 14); @@ -35,5 +35,5 @@ int main() assert(d[11] == 1); assert(d[12] == 1); assert(d[13] == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp index a5fdd0848..eeffd47ae 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::allocator > A; typedef std::unordered_map >, @@ -57,5 +57,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp index 94ecfe6bd..4afd6ce70 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map >, @@ -59,5 +59,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp index 00eb478d1..af434a3a4 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map >, @@ -60,5 +60,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp index 8c992399d..2e5d72dc7 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map >, @@ -62,5 +62,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp index dbf8bbfad..55876e34f 100644 --- a/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map >, @@ -63,5 +63,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp b/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp index 3865437b3..c17cc83ad 100644 --- a/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp +++ b/test/containers/unord/unord.map/unorder.map.modifiers/insert_init.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_map C; typedef std::pair P; @@ -44,5 +44,5 @@ int main() assert(c.at(3) == "three"); assert(c.at(4) == "four"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp index 00e337b30..9fd482e09 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef test_allocator > A; typedef std::unordered_multimap >, @@ -79,5 +79,5 @@ int main() assert(c.key_eq() == test_compare >()); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp index 0ac5f213a..4173c3b8a 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap >, @@ -81,5 +81,5 @@ int main() assert(c.key_eq() == test_compare >()); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp index c9e417126..1845cb21d 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap >, @@ -82,5 +82,5 @@ int main() assert(c.key_eq() == test_compare >()); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp index 365e7cc0e..c81a2f7f3 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap >, @@ -84,5 +84,5 @@ int main() assert(c.key_eq() == test_compare >(9)); assert((c.get_allocator() == test_allocator >())); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp index 6068b5536..6249ce7fc 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -26,7 +26,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap >, @@ -85,5 +85,5 @@ int main() assert(c.key_eq() == test_compare >(9)); assert((c.get_allocator() == test_allocator >(10))); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp index 5fc624d85..4d9d2506c 100644 --- a/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp +++ b/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_init.pass.cpp @@ -23,7 +23,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multimap C; typedef std::pair P; @@ -69,5 +69,5 @@ int main() assert(std::distance(c.begin(), c.end()) == c.size()); assert(std::distance(c.cbegin(), c.cend()) == c.size()); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multiset/insert_init.pass.cpp b/test/containers/unord/unord.multiset/insert_init.pass.cpp index 12deda033..60090d251 100644 --- a/test/containers/unord/unord.multiset/insert_init.pass.cpp +++ b/test/containers/unord/unord.multiset/insert_init.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset C; typedef int P; @@ -43,5 +43,5 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp index 4d5148900..ebf437bd1 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef test_allocator A; typedef std::unordered_multiset >, @@ -55,5 +55,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp index 747085cea..ef2a15d9e 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset >, @@ -57,5 +57,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp index be437f999..6be42d76f 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset >, @@ -59,5 +59,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp index 1a864561c..8b6fcb0a6 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset >, @@ -60,5 +60,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp index eaf57236e..1ff8a173e 100644 --- a/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_multiset >, @@ -61,5 +61,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.set/insert_init.pass.cpp b/test/containers/unord/unord.set/insert_init.pass.cpp index 9d573b0bf..370ff0230 100644 --- a/test/containers/unord/unord.set/insert_init.pass.cpp +++ b/test/containers/unord/unord.set/insert_init.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set C; typedef int P; @@ -43,5 +43,5 @@ int main() assert(c.count(3) == 1); assert(c.count(4) == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp index 899e6de04..77c52f7d9 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef test_allocator A; typedef std::unordered_set >, @@ -55,5 +55,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp index ce3b54284..cdc2947cc 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp @@ -24,7 +24,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set >, @@ -57,5 +57,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp index 925feb0ce..bb0b211fe 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set >, @@ -59,5 +59,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp index aab350487..5e735c9b9 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set >, @@ -60,5 +60,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp index 241e2084e..1a7bdaa98 100644 --- a/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp +++ b/test/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp @@ -25,7 +25,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::unordered_set >, @@ -61,5 +61,5 @@ int main() assert(c.load_factor() == (float)c.size()/c.bucket_count()); assert(c.max_load_factor() == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/language.support/support.initlist/support.initlist.access/access.pass.cpp b/test/language.support/support.initlist/support.initlist.access/access.pass.cpp index b24e2ab53..1d6d6e288 100644 --- a/test/language.support/support.initlist/support.initlist.access/access.pass.cpp +++ b/test/language.support/support.initlist/support.initlist.access/access.pass.cpp @@ -16,6 +16,8 @@ #include #include +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + struct A { A(std::initializer_list il) @@ -30,9 +32,11 @@ struct A } }; +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS A test1 = {3, 2, 1}; #endif } diff --git a/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp b/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp index f65ebd99d..1cb52f413 100644 --- a/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp +++ b/test/language.support/support.initlist/support.initlist.cons/default.pass.cpp @@ -18,6 +18,8 @@ struct A {}; int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::initializer_list il; assert(il.size() == 0); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp b/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp index d93f3dc9d..2c30d9abc 100644 --- a/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp +++ b/test/language.support/support.initlist/support.initlist.range/begin_end.pass.cpp @@ -14,6 +14,8 @@ #include #include +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + struct A { A(std::initializer_list il) @@ -28,9 +30,11 @@ struct A } }; +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS A test1 = {3, 2, 1}; #endif } diff --git a/test/language.support/support.initlist/types.pass.cpp b/test/language.support/support.initlist/types.pass.cpp index 9ff08e9c9..835830055 100644 --- a/test/language.support/support.initlist/types.pass.cpp +++ b/test/language.support/support.initlist/types.pass.cpp @@ -26,10 +26,12 @@ struct A {}; int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS static_assert((std::is_same::value_type, A>::value), ""); static_assert((std::is_same::reference, const A&>::value), ""); static_assert((std::is_same::const_reference, const A&>::value), ""); static_assert((std::is_same::size_type, std::size_t>::value), ""); static_assert((std::is_same::iterator, const A*>::value), ""); static_assert((std::is_same::const_iterator, const A*>::value), ""); +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp b/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp index ebbe0f20c..571f56acd 100644 --- a/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp +++ b/test/numerics/numarray/template.valarray/valarray.assign/initializer_list_assign.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -53,5 +53,5 @@ int main() assert(v2[i][j] == a[i][j]); } } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp b/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp index 3aa79b007..1ab460f1b 100644 --- a/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp +++ b/test/numerics/numarray/template.valarray/valarray.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef int T; T a[] = {1, 2, 3, 4, 5}; @@ -37,5 +37,5 @@ int main() for (int i = 0; i < N; ++i) assert(v[i] == a[i]); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp index cb717d41d..2538603cd 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp @@ -19,11 +19,14 @@ int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; - D d; + D d = {1., 2.}; std::vector p = d.probabilities(); - assert(p.size() == 1); + assert(p.size() == 2); assert(p[0] == 1); + assert(p[1] == 2); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp index b637de2e5..bc4494b98 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_init.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; D d = {}; @@ -77,5 +77,5 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp index b98c71d39..1071305f4 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_default.pass.cpp @@ -19,12 +19,14 @@ int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; typedef D::param_type P; - P pa; + P pa = {1}; std::vector p = pa.probabilities(); assert(p.size() == 1); assert(p[0] == 1); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp index ebb873034..79d8a0b71 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/param_ctor_init.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; typedef D::param_type P; @@ -84,5 +84,5 @@ int main() assert(p[1] == 0); assert(p[2] == 1); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp index 2fd7c7257..d4f339fe7 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_default.pass.cpp @@ -19,6 +19,7 @@ int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_constant_distribution<> D; D d; @@ -30,4 +31,5 @@ int main() assert(dn.size() == 1); assert(dn[0] == 1); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp index c4ceb6573..5708e4509 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp @@ -27,7 +27,7 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_constant_distribution<> D; D d({}, f); @@ -74,5 +74,5 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp index 2b950d181..fa6530979 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp @@ -24,7 +24,7 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_constant_distribution<> D; typedef D::param_type P; @@ -75,5 +75,5 @@ int main() assert(dn[0] == 0.203125); assert(dn[1] == 0.1484375); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp index 9320f4779..745bd6b97 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp @@ -19,6 +19,7 @@ int main() { +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_linear_distribution<> D; D d; @@ -31,4 +32,5 @@ int main() assert(dn[0] == 1); assert(dn[1] == 1); } +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp index c1890e3d6..44c76f0cf 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp @@ -27,7 +27,7 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_linear_distribution<> D; D d({}, f); @@ -78,5 +78,5 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp index 766e986cd..cfa416434 100644 --- a/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp +++ b/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp @@ -24,7 +24,7 @@ double f(double x) int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::piecewise_linear_distribution<> D; typedef D::param_type P; @@ -79,5 +79,5 @@ int main() assert(dn[1] == 0.125); assert(dn[2] == 0.175); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp b/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp index 7e3fc734d..d4ee9c14d 100644 --- a/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp +++ b/test/numerics/rand/rand.util/rand.util.seedseq/initializer_list.pass.cpp @@ -19,7 +19,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::seed_seq s= {5, 4, 3, 2, 1}; assert(s.size() == 5); unsigned b[5] = {0}; @@ -29,5 +29,5 @@ int main() assert(b[2] == 3); assert(b[3] == 2); assert(b[4] == 1); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp b/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp index a24bce697..0de144899 100644 --- a/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp +++ b/test/re/re.iter/re.tokiter/re.tokiter.cnstr/init.pass.cpp @@ -22,7 +22,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::regex phone_numbers("\\d{3}-(\\d{4})"); const char phone_book[] = "start 555-1234, 555-2345, 555-3456 end"; @@ -60,5 +60,5 @@ int main() ++i; assert(i == std::cregex_token_iterator()); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/re/re.regex/re.regex.assign/assign.il.pass.cpp b/test/re/re.regex/re.regex.assign/assign.il.pass.cpp index 3f90dc62a..96cadf166 100644 --- a/test/re/re.regex/re.regex.assign/assign.il.pass.cpp +++ b/test/re/re.regex/re.regex.assign/assign.il.pass.cpp @@ -20,7 +20,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::regex r2; r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}); assert(r2.flags() == std::regex::ECMAScript); @@ -29,5 +29,5 @@ int main() r2.assign({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex::extended); assert(r2.flags() == std::regex::extended); assert(r2.mark_count() == 2); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/re/re.regex/re.regex.assign/il.pass.cpp b/test/re/re.regex/re.regex.assign/il.pass.cpp index 59742de0c..a9d8ada4f 100644 --- a/test/re/re.regex/re.regex.assign/il.pass.cpp +++ b/test/re/re.regex/re.regex.assign/il.pass.cpp @@ -18,10 +18,10 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::regex r2; r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}; assert(r2.flags() == std::regex::ECMAScript); assert(r2.mark_count() == 2); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/re/re.regex/re.regex.construct/il_flg.pass.cpp b/test/re/re.regex/re.regex.construct/il_flg.pass.cpp index 60636635a..70d28df37 100644 --- a/test/re/re.regex/re.regex.construct/il_flg.pass.cpp +++ b/test/re/re.regex/re.regex.construct/il_flg.pass.cpp @@ -17,7 +17,7 @@ #include #include -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS void test(std::initializer_list il, std::regex_constants::syntax_option_type f, unsigned mc) @@ -27,11 +27,11 @@ test(std::initializer_list il, std::regex_constants::syntax_option_type f, assert(r.mark_count() == mc); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS std::string s1("\\(a\\)"); std::string s2("\\(a[bc]\\)"); std::string s3("\\(a\\([bc]\\)\\)"); @@ -66,5 +66,5 @@ int main() test({'\\', '(', 'a', '[', 'b', 'c', ']', '\\', ')'}, std::regex_constants::egrep, 0); test({'\\', '(', 'a', '\\', '(', '[', 'b', 'c', ']', '\\', ')', '\\', ')'}, std::regex_constants::egrep, 0); test({'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'}, std::regex_constants::egrep, 2); -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.cons/initializer_list.pass.cpp b/test/strings/basic.string/string.cons/initializer_list.pass.cpp index 95093f854..430c2acf6 100644 --- a/test/strings/basic.string/string.cons/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.cons/initializer_list.pass.cpp @@ -18,7 +18,7 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s = {'a', 'b', 'c'}; assert(s == "abc"); @@ -28,5 +28,5 @@ int main() s = {L'a', L'b', L'c'}; assert(s == L"abc"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp b/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp index eaa08c081..f7ac16f1f 100644 --- a/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp +++ b/test/strings/basic.string/string.cons/initializer_list_assignment.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s; s = {'a', 'b', 'c'}; assert(s == "abc"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp index a356ae2a0..765e6c3d5 100644 --- a/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_append/initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s("123"); s.append({'a', 'b', 'c'}); assert(s == "123abc"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp index ddc33ec52..e27f714a1 100644 --- a/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_assign/initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s("123"); s.assign({'a', 'b', 'c'}); assert(s == "abc"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp index b228f8cd9..1db86eced 100644 --- a/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_insert/iter_initializer_list.pass.cpp @@ -16,12 +16,12 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s("123456"); std::string::iterator i = s.insert(s.begin() + 3, {'a', 'b', 'c'}); assert(i - s.begin() == 3); assert(s == "123abc456"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp index f6d8eb24f..cc3a48800 100644 --- a/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_op_plus_equal/initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s("123"); s += {'a', 'b', 'c'}; assert(s == "123abc"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } diff --git a/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp b/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp index 83246edbb..def2629f2 100644 --- a/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp +++ b/test/strings/basic.string/string.modifiers/string_replace/iter_iter_initializer_list.pass.cpp @@ -16,11 +16,11 @@ int main() { -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { std::string s("123def456"); s.replace(s.cbegin() + 3, s.cbegin() + 6, {'a', 'b', 'c'}); assert(s == "123abc456"); } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS }