From a3c28ccd49391931acd8b3b27dc98d7c606051e0 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 30 Jul 2020 10:00:53 -0400 Subject: [PATCH] [libc++] Remove some workarounds for missing variadic templates We don't support GCC in C++03 mode, and Clang provides variadic templates even in C++03 mode. So there's effectively no supported compiler that doesn't support variadic templates. This effectively gets rid of all uses of _LIBCPP_HAS_NO_VARIADICS, but some workarounds for the lack of variadics remain. --- libcxx/include/__config | 4 - libcxx/include/future | 6 +- libcxx/include/memory | 157 +------------- libcxx/include/type_traits | 237 ++++++++------------- .../member_function_pointer_no_variadics.pass.cpp | 84 -------- 5 files changed, 92 insertions(+), 396 deletions(-) delete mode 100644 libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer_no_variadics.pass.cpp diff --git a/libcxx/include/__config b/libcxx/include/__config index 17e6bfe..c29fd42 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -456,10 +456,6 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_AUTO_TYPE #endif -#if !(__has_feature(cxx_variadic_templates)) -#define _LIBCPP_HAS_NO_VARIADICS -#endif - // Objective-C++ features (opt-in) #if __has_feature(objc_arc) #define _LIBCPP_HAS_OBJC_ARC diff --git a/libcxx/include/future b/libcxx/include/future index 483266d..295b6ac 100644 --- a/libcxx/include/future +++ b/libcxx/include/future @@ -1605,8 +1605,6 @@ template struct _LIBCPP_TEMPLATE_VIS uses_allocator, _Alloc> : public true_type {}; -#ifndef _LIBCPP_HAS_NO_VARIADICS - // packaged_task template class __packaged_task_base; @@ -2158,6 +2156,8 @@ __make_async_assoc_state(_Fp&& __f) return future<_Rp>(__h.get()); } +#ifndef _LIBCPP_CXX03_LANG + template class _LIBCPP_HIDDEN __async_func { @@ -2225,7 +2225,7 @@ async(_Fp&& __f, _Args&&... __args) _VSTD::forward<_Args>(__args)...); } -#endif // _LIBCPP_HAS_NO_VARIADICS +#endif // C++03 // shared_future diff --git a/libcxx/include/memory b/libcxx/include/memory index ebb0a72..0ce7d09 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -762,8 +762,6 @@ struct __pointer_traits_element_type<_Ptr, true> typedef _LIBCPP_NODEBUG_TYPE typename _Ptr::element_type type; }; -#ifndef _LIBCPP_HAS_NO_VARIADICS - template