From 01666904013c1514b16ace896ba346d1273a034f Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 17 Aug 2021 11:59:07 -0400 Subject: [PATCH] [libc++] Remove workarounds for the lack of deduction guides in C++17 All supported compilers have supported deduction guides in C++17 for a while, so this isn't necessary anymore. Differential Revision: https://reviews.llvm.org/D108213 --- libcxx/include/__config | 4 ---- libcxx/include/__functional/function.h | 4 ++-- libcxx/include/__functional/reference_wrapper.h | 2 +- libcxx/include/__iterator/iterator_traits.h | 4 ++-- libcxx/include/__memory/shared_ptr.h | 4 ++-- libcxx/include/__utility/pair.h | 4 ++-- libcxx/include/array | 2 +- libcxx/include/deque | 2 +- libcxx/include/forward_list | 2 +- libcxx/include/list | 2 +- libcxx/include/map | 4 ++-- libcxx/include/optional | 2 +- libcxx/include/queue | 4 ++-- libcxx/include/regex | 2 +- libcxx/include/set | 4 ++-- libcxx/include/stack | 2 +- libcxx/include/string | 2 +- libcxx/include/tuple | 2 +- libcxx/include/unordered_map | 4 ++-- libcxx/include/unordered_set | 4 ++-- libcxx/include/vector | 2 +- libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp | 1 - libcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp | 1 - .../std/containers/associative/map/map.cons/deduct_const.pass.cpp | 1 - .../std/containers/associative/multimap/multimap.cons/deduct.fail.cpp | 1 - .../std/containers/associative/multimap/multimap.cons/deduct.pass.cpp | 1 - .../associative/multimap/multimap.cons/deduct_const.pass.cpp | 1 - .../std/containers/associative/multiset/multiset.cons/deduct.fail.cpp | 1 - .../std/containers/associative/multiset/multiset.cons/deduct.pass.cpp | 1 - libcxx/test/std/containers/associative/set/set.cons/deduct.fail.cpp | 1 - libcxx/test/std/containers/associative/set/set.cons/deduct.pass.cpp | 1 - .../container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp | 1 - .../container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp | 1 - .../containers/container.adaptors/queue/queue.cons/deduct.fail.cpp | 1 - .../containers/container.adaptors/queue/queue.cons/deduct.pass.cpp | 1 - .../containers/container.adaptors/stack/stack.cons/deduct.fail.cpp | 2 -- .../containers/container.adaptors/stack/stack.cons/deduct.pass.cpp | 2 -- libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp | 2 -- libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp | 3 --- libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp | 3 --- libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp | 3 --- .../containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp | 3 --- .../containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp | 3 --- libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp | 3 --- libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp | 3 --- .../test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp | 3 --- .../test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp | 3 --- .../std/containers/unord/unord.map/unord.map.cnstr/deduct.fail.cpp | 1 - .../std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp | 1 - .../containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp | 1 - .../unord/unord.multimap/unord.multimap.cnstr/deduct.fail.cpp | 1 - .../unord/unord.multimap/unord.multimap.cnstr/deduct.pass.cpp | 1 - .../unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp | 1 - .../unord/unord.multiset/unord.multiset.cnstr/deduct.fail.cpp | 1 - .../unord/unord.multiset/unord.multiset.cnstr/deduct.pass.cpp | 1 - .../std/containers/unord/unord.set/unord.set.cnstr/deduct.fail.cpp | 1 - .../std/containers/unord/unord.set/unord.set.cnstr/deduct.pass.cpp | 1 - libcxx/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp | 3 --- libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp | 3 --- .../basic.string/string.cons/implicit_deduction_guides.pass.cpp | 1 - .../strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp | 2 -- .../strings/basic.string/string.cons/string_view_deduction.fail.cpp | 2 -- .../strings/basic.string/string.cons/string_view_deduction.pass.cpp | 2 -- .../basic.string/string.cons/string_view_size_size_deduction.fail.cpp | 2 -- .../basic.string/string.cons/string_view_size_size_deduction.pass.cpp | 2 -- .../string.view/string.view.cons/implicit_deduction_guides.pass.cpp | 1 - .../thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp | 2 +- .../thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp | 2 +- .../thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp | 2 +- .../thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp | 2 +- .../func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.fail.cpp | 2 -- .../func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.pass.cpp | 2 -- .../func.wrap/func.wrap.func/func.wrap.func.con/deduct_ptr.pass.cpp | 2 -- .../utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp | 1 - .../function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp | 4 +++- .../util.smartptr.shared.const/deduction.pass.cpp | 1 - .../util.smartptr.weak.const/shared_ptr_deduction.pass.cpp | 1 - .../optional/optional.object/optional.object.ctor/deduct.fail.cpp | 3 --- .../optional/optional.object/optional.object.ctor/deduct.pass.cpp | 3 --- .../test/std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp | 1 - .../utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp | 1 - libcxx/utils/libcxx/test/features.py | 1 - 82 files changed, 36 insertions(+), 131 deletions(-) diff --git a/libcxx/include/__config b/libcxx/include/__config index a573629..0f2a231 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -1350,10 +1350,6 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container( #define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS #endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES -#if !defined(__cpp_deduction_guides) || __cpp_deduction_guides < 201611 -#define _LIBCPP_HAS_NO_DEDUCTION_GUIDES -#endif - #if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L #define _LIBCPP_HAS_NO_COROUTINES #endif diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h index baa0135..386f8aa 100644 --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -1045,7 +1045,7 @@ public: #endif // _LIBCPP_NO_RTTI }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template function(_Rp(*)(_Ap...)) -> function<_Rp(_Ap...)>; @@ -1090,7 +1090,7 @@ struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile & noexcept> { usin template::type> function(_Fp) -> function<_Stripped>; -#endif // !_LIBCPP_HAS_NO_DEDUCTION_GUIDES +#endif // _LIBCPP_STD_VER >= 17 template function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {} diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h index 09f4a64..20b3eed 100644 --- a/libcxx/include/__functional/reference_wrapper.h +++ b/libcxx/include/__functional/reference_wrapper.h @@ -176,7 +176,7 @@ public: #endif // _LIBCPP_CXX03_LANG }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template reference_wrapper(_Tp&) -> reference_wrapper<_Tp>; #endif diff --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h index 5275705..a0454d2 100644 --- a/libcxx/include/__iterator/iterator_traits.h +++ b/libcxx/include/__iterator/iterator_traits.h @@ -477,7 +477,7 @@ struct __is_exactly_cpp17_input_iterator __has_iterator_category_convertible_to<_Tp, input_iterator_tag>::value && !__has_iterator_category_convertible_to<_Tp, forward_iterator_tag>::value> {}; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template using __iter_value_type = typename iterator_traits<_InputIterator>::value_type; @@ -491,7 +491,7 @@ template using __iter_to_alloc_type = pair< add_const_t::value_type::first_type>, typename iterator_traits<_InputIterator>::value_type::second_type>; -#endif // _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#endif // _LIBCPP_STD_VER >= 17 _LIBCPP_END_NAMESPACE_STD diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h index 04161c4..9ac7ba8 100644 --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -686,7 +686,7 @@ private: template friend class _LIBCPP_TEMPLATE_VIS weak_ptr; }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template shared_ptr(weak_ptr<_Tp>) -> shared_ptr<_Tp>; template @@ -1406,7 +1406,7 @@ public: template friend class _LIBCPP_TEMPLATE_VIS shared_ptr; }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>; #endif diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h index e0216f3..06d68d5 100644 --- a/libcxx/include/__utility/pair.h +++ b/libcxx/include/__utility/pair.h @@ -310,10 +310,10 @@ private: #endif }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template pair(_T1, _T2) -> pair<_T1, _T2>; -#endif // _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#endif template inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 diff --git a/libcxx/include/array b/libcxx/include/array index 022172b..b76b9fa 100644 --- a/libcxx/include/array +++ b/libcxx/include/array @@ -356,7 +356,7 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template::value...>::value> > diff --git a/libcxx/include/deque b/libcxx/include/deque index aff93de..37ba586 100644 --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -1588,7 +1588,7 @@ public: void __move_assign(deque& __c, false_type); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class = _EnableIf<__is_allocator<_Alloc>::value> diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index 0ae8f19..66aa757 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -870,7 +870,7 @@ private: }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class = _EnableIf<__is_allocator<_Alloc>::value> diff --git a/libcxx/include/list b/libcxx/include/list index 23da5fc..2ae6d58 100644 --- a/libcxx/include/list +++ b/libcxx/include/list @@ -1141,7 +1141,7 @@ private: void __move_assign(list& __c, false_type); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class = _EnableIf<__is_allocator<_Alloc>::value> diff --git a/libcxx/include/map b/libcxx/include/map index 513a04d..3c2b6ff 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -1502,7 +1502,7 @@ private: #endif }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, class = _EnableIf::value, void>, @@ -2175,7 +2175,7 @@ private: typedef unique_ptr<__node, _Dp> __node_holder; }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, class = _EnableIf::value, void>, diff --git a/libcxx/include/optional b/libcxx/include/optional index 5aec969..4469360 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -1000,7 +1000,7 @@ public: using __base::reset; }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template optional(T) -> optional; #endif diff --git a/libcxx/include/queue b/libcxx/include/queue index 276fff9..2a09bac 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -358,7 +358,7 @@ public: operator< (const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template::value> > @@ -584,7 +584,7 @@ public: __is_nothrow_swappable::value); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template ::value>, diff --git a/libcxx/include/regex b/libcxx/include/regex index e47cf9f..a0bf3e2 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -3014,7 +3014,7 @@ private: template friend class __lookahead; }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template ::value, nullptr_t>::type > diff --git a/libcxx/include/set b/libcxx/include/set index 21ec843..04f8fc2 100644 --- a/libcxx/include/set +++ b/libcxx/include/set @@ -868,7 +868,7 @@ public: #endif }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Allocator = allocator<__iter_value_type<_InputIterator>>, @@ -1399,7 +1399,7 @@ public: #endif }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Allocator = allocator<__iter_value_type<_InputIterator>>, diff --git a/libcxx/include/stack b/libcxx/include/stack index aefef31..5ee4d51 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -231,7 +231,7 @@ public: operator< (const stack& __x, const stack& __y); }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template::value> > diff --git a/libcxx/include/string b/libcxx/include/string index 4940021..01b79d8 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1732,7 +1732,7 @@ _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE, wchar_t) #endif -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template, class _Allocator = allocator<_CharT>, diff --git a/libcxx/include/tuple b/libcxx/include/tuple index e1019ef..2e339f8 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -1097,7 +1097,7 @@ public: void swap(tuple&) _NOEXCEPT {} }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template tuple(_Tp...) -> tuple<_Tp...>; template diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index ea0382d..a0c1c55 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -1464,7 +1464,7 @@ private: #endif }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Pred = equal_to<__iter_key_type<_InputIterator>>, @@ -2263,7 +2263,7 @@ public: }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Pred = equal_to<__iter_key_type<_InputIterator>>, diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set index a775a92..de87dcd 100644 --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -799,7 +799,7 @@ public: }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Pred = equal_to<__iter_value_type<_InputIterator>>, @@ -1465,7 +1465,7 @@ public: }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class _Pred = equal_to<__iter_value_type<_InputIterator>>, diff --git a/libcxx/include/vector b/libcxx/include/vector index 9189ed4..3afaddc 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -931,7 +931,7 @@ private: } }; -#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES +#if _LIBCPP_STD_VER >= 17 template>, class = _EnableIf<__is_allocator<_Alloc>::value> diff --git a/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp b/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp index 13722e9..a71efaf 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // clang-6 gives different error messages. diff --git a/libcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp index 139714b..4444782 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/associative/map/map.cons/deduct_const.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/deduct_const.pass.cpp index d584ffd..3da55fa 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/deduct_const.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/deduct_const.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp index fc8a407..541989a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // clang-6 gives different error messages. diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp index e5b42eb..b1faba6 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp index 127ee6e..716c522 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.fail.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.fail.cpp index 59f90d2..79a73f8 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // clang-6 gives different error messages. diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.pass.cpp index 9e0a7fe..180fa06 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // UNSUPPORTED: apple-clang-9.1 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // clang-6 gives different error messages. diff --git a/libcxx/test/std/containers/associative/set/set.cons/deduct.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/deduct.pass.cpp index a4175ae..0a38ef3 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/deduct.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // UNSUPPORTED: apple-clang-9.1 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides #include #include diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp index 89ff2e7..6804c4d 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template // priority_queue(Compare, Container) diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp index 4a7bfc8..301acca 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides #include #include diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp index 4404cc1..716e409 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp @@ -9,7 +9,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: clang-5, apple-clang-9 -// UNSUPPORTED: libcpp-no-deduction-guides // Clang 5 will generate bad implicit deduction guides // Specifically, for the copy constructor. diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp index a38848b..55296f4 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp @@ -8,8 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // vector(InputIterator, InputIterator, Allocator = Allocator()) diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp index 5e279fc..41187e7 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp @@ -9,11 +9,9 @@ // // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: clang-5, apple-clang-9 -// UNSUPPORTED: libcpp-no-deduction-guides // Clang 5 will generate bad implicit deduction guides // Specifically, for the copy constructor. - // template // stack(Container) -> stack; // diff --git a/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp index ede849f..37b4cc0 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp @@ -8,8 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template // array(T, U...) -> array; diff --git a/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp index 292fe8a..44d8dcb 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp @@ -9,17 +9,14 @@ // // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: clang-5, apple-clang-9 -// UNSUPPORTED: libcpp-no-deduction-guides // Clang 5 will generate bad implicit deduction guides // Specifically, for the copy constructor. - // template // array(T, U...) -> array; // // Requires: (is_same_v && ...) is true. Otherwise the program is ill-formed. - #include #include #include diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp index f40577d..044669a 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // deque(InputIterator, InputIterator, Allocator = Allocator()) // -> deque::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp index 3f0e16f..fb5f69c 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // deque(InputIterator, InputIterator, Allocator = Allocator()) // -> deque::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp index dcfb89f..47c1cdc 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // forward_list(InputIterator, InputIterator, Allocator = Allocator()) // -> forward_list::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp index 6c134d84..9af93f9 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // forward_list(InputIterator, InputIterator, Allocator = Allocator()) // -> forward_list::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp index b06674f..96d1451 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/deduct.fail.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // list(InputIterator, InputIterator, Allocator = Allocator()) // -> list::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp index 9196317..afebdf8 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // list(InputIterator, InputIterator, Allocator = Allocator()) // -> list::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp index 387328f..7ce00d7 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // vector(InputIterator, InputIterator, Allocator = Allocator()) // -> vector::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp index f343ba8..6cdc19a 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // vector(InputIterator, InputIterator, Allocator = Allocator()) // -> vector::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.fail.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.fail.cpp index a84a1c0..2fc7fbe 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp index 277639f..506a2b7 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.fail.cpp index ab60b3c..7fc82de 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp index 9f2bf24..c22f121 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template>, diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.fail.cpp index bf0d970..6e678aa 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // UNSUPPORTED: apple-clang-9.1 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // UNSUPPORTED: apple-clang-9.1 // template // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template ::value_type>> // vector(InputIterator, InputIterator, Allocator = Allocator()) // -> vector::value_type, Allocator>; // - #include #include #include diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp index 1a18dc2..feabcfc 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp @@ -8,15 +8,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides - // template // basic_regex(ForwardIterator, ForwardIterator, // regex_constants::syntax_option_type = regex_constants::ECMAScript) // -> basic_regex::value_type>; - #include #include #include diff --git a/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp index a385032..e7dd236 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/implicit_deduction_guides.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // diff --git a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp index 3292003f..4082005 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// XFAIL: libcpp-no-deduction-guides // template // basic_string(InputIterator begin, InputIterator end, @@ -25,7 +24,6 @@ // is a type that does not qualify as an input iterator, or if Allocator is a type // that does not qualify as an allocator. - #include #include #include diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp index 1fa2ee0..40211cf 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// XFAIL: libcpp-no-deduction-guides // template // basic_string(InputIterator begin, InputIterator end, @@ -24,7 +23,6 @@ // The deduction guide shall not participate in overload resolution if Allocator // is a type that does not qualify as an allocator. - #include #include #include diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp index e6dc0a7..46b3b8f 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// XFAIL: libcpp-no-deduction-guides // template // basic_string(InputIterator begin, InputIterator end, @@ -24,7 +23,6 @@ // The deduction guide shall not participate in overload resolution if Allocator // is a type that does not qualify as an allocator. - #include #include #include diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp index 07c9002..7e087fe 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// XFAIL: libcpp-no-deduction-guides // template // basic_string(InputIterator begin, InputIterator end, @@ -30,7 +29,6 @@ // The deduction guide shall not participate in overload resolution if Allocator // is a type that does not qualify as an allocator. - #include #include #include diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp index fae3b47..69e94ad 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// XFAIL: libcpp-no-deduction-guides // template // basic_string(InputIterator begin, InputIterator end, @@ -30,7 +29,6 @@ // The deduction guide shall not participate in overload resolution if Allocator // is a type that does not qualify as an allocator. - #include #include #include diff --git a/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp index d17ece6..8e1ff27 100644 --- a/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/strings/string.view/string.view.cons/implicit_deduction_guides.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp index 5dcecd3..ddcc080 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp @@ -40,7 +40,7 @@ int main(int, char**) { m.lock(); m.unlock(); -#ifdef __cpp_deduction_guides +#if TEST_STD_VER >= 17 std::lock_guard lg(m); static_assert((std::is_same>::value), "" ); #endif diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp index 41c7aeb..816eb7c 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp @@ -130,7 +130,7 @@ int main(int, char**) } #endif -#ifdef __cpp_deduction_guides +#if TEST_STD_VER >= 17 { TestMutex m1, m2, m3; { diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp index d09cde0..9eba9cd 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp @@ -99,7 +99,7 @@ int main(int, char**) q.join(); } -#ifdef __cpp_deduction_guides +#if TEST_STD_VER >= 17 std::shared_lock sl(m); static_assert((std::is_same>::value), "" ); #endif diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp index bd25d02..0c3e5e5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp @@ -55,7 +55,7 @@ int main(int, char**) m.unlock(); t.join(); -#ifdef __cpp_deduction_guides +#if TEST_STD_VER >= 17 std::unique_lock ul(m); static_assert((std::is_same>::value), "" ); #endif diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.fail.cpp index 7c80662..cc20a01 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.fail.cpp @@ -13,7 +13,6 @@ // function(F) -> function; // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // The deduction guides for std::function do not handle rvalue-ref qualified // call operators and C-style variadics. It also doesn't deduce from nullptr_t. @@ -22,7 +21,6 @@ #include #include - struct R { }; struct f0 { R operator()() && { return {}; } }; struct f1 { R operator()(int, ...) { return {}; } }; diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.pass.cpp index 793673d..00d1831 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_F.pass.cpp @@ -13,7 +13,6 @@ // function(F) -> function; // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides #include #include @@ -21,7 +20,6 @@ #include "test_macros.h" - struct R { }; struct A1 { }; struct A2 { }; diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_ptr.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_ptr.pass.cpp index edd4322..cc61a75 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_ptr.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/deduct_ptr.pass.cpp @@ -13,14 +13,12 @@ // function(R(*)(Args...)) -> function; // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides #include #include #include "test_macros.h" - struct R { }; struct A1 { }; struct A2 { }; diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp index 4e197e8..56a226d 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // diff --git a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp index d8ad182..01fe619 100644 --- a/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp +++ b/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp @@ -18,6 +18,8 @@ #include #include +#include "test_macros.h" + struct convertible_to_int_ref { int val = 0; operator int&() { return val; } @@ -68,7 +70,7 @@ int main() (true) ? purr() : 0; } -#ifdef __cpp_deduction_guides +#if TEST_STD_VER >= 17 { int i = 0; std::reference_wrapper ri(i); diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/deduction.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/deduction.pass.cpp index 03ee2db..05810e8 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/deduction.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/deduction.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template class shared_ptr diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_deduction.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_deduction.pass.cpp index 3bcdebf..bf4a432 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_deduction.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.weak.const/shared_ptr_deduction.pass.cpp @@ -8,7 +8,6 @@ // // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // template class weak_ptr diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp index 3c051eb..95e7048 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp @@ -9,15 +9,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: clang-5 -// UNSUPPORTED: libcpp-no-deduction-guides // Clang 5 will generate bad implicit deduction guides // Specifically, for the copy constructor. - // template // optional(T) -> optional; - #include #include diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp index b75b155..72f747f 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp @@ -9,15 +9,12 @@ // // UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: clang-5, apple-clang-9 -// UNSUPPORTED: libcpp-no-deduction-guides // Clang 5 will generate bad implicit deduction guides // Specifically, for the copy constructor. - // template // optional(T) -> optional; - #include #include diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp index abec365..623bcb6 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // UNSUPPORTED: apple-clang-9 // GCC's implementation of class template deduction is still immature and runs diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp index cd90fd7..3c0a7f1 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/implicit_deduction_guides.pass.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-deduction-guides // GCC's implementation of class template deduction is still immature and runs // into issues with libc++. However GCC accepts this code when compiling diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py index 09afe20..205a486 100644 --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -37,7 +37,6 @@ DEFAULT_FEATURES = [ Feature(name='fdelayed-template-parsing', when=lambda cfg: hasCompileFlag(cfg, '-fdelayed-template-parsing')), Feature(name='libcpp-no-if-constexpr', when=lambda cfg: '__cpp_if_constexpr' not in featureTestMacros(cfg)), Feature(name='libcpp-no-structured-bindings', when=lambda cfg: '__cpp_structured_bindings' not in featureTestMacros(cfg)), - Feature(name='libcpp-no-deduction-guides', when=lambda cfg: featureTestMacros(cfg).get('__cpp_deduction_guides', 0) < 201611), Feature(name='libcpp-no-concepts', when=lambda cfg: featureTestMacros(cfg).get('__cpp_concepts', 0) < 201907), Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms. -- 2.7.4