summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/__functional_base22
-rw-r--r--libcxx/include/functional10
2 files changed, 14 insertions, 18 deletions
diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base
index 4e2b7eb8d28..0d2c2fc6501 100644
--- a/libcxx/include/__functional_base
+++ b/libcxx/include/__functional_base
@@ -251,7 +251,7 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1) const volatile>
};
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
// 3 or more arguments
template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
@@ -296,10 +296,6 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile>
typedef _Rp result_type;
};
-#endif // _LIBCPP_HAS_NO_VARIADICS
-
-#ifndef _LIBCPP_CXX03_LANG
-
template <class _Tp, class ..._Args>
struct __invoke_return
{
@@ -316,7 +312,7 @@ struct __invoke_return
template <class _Ret>
struct __invoke_void_return_wrapper
{
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class ..._Args>
static _Ret __call(_Args&&... __args) {
return __invoke(_VSTD::forward<_Args>(__args)...);
@@ -347,7 +343,7 @@ struct __invoke_void_return_wrapper
template <>
struct __invoke_void_return_wrapper<void>
{
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class ..._Args>
static void __call(_Args&&... __args) {
__invoke(_VSTD::forward<_Args>(__args)...);
@@ -389,7 +385,7 @@ public:
// construct/copy/destroy
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT
: __f_(_VSTD::addressof(__f)) {}
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#ifndef _LIBCPP_CXX03_LANG
private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
#endif
@@ -397,7 +393,7 @@ public:
_LIBCPP_INLINE_VISIBILITY operator type& () const _NOEXCEPT {return *__f_;}
_LIBCPP_INLINE_VISIBILITY type& get() const _NOEXCEPT {return *__f_;}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
// invoke
template <class... _ArgTypes>
_LIBCPP_INLINE_VISIBILITY
@@ -510,7 +506,7 @@ public:
operator() (_A0 const& __a0, _A1 const& __a1, _A2 const& __a2) const {
return __invoke(get(), __a0, __a1, __a2);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // _LIBCPP_CXX03_LANG
};
@@ -568,7 +564,7 @@ public:
struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { };
-#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MEMORY)
+#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_MEMORY)
extern const allocator_arg_t allocator_arg;
#else
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
@@ -611,7 +607,7 @@ template <class _Tp, class _Alloc>
constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
#endif
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
// allocator construction
@@ -663,7 +659,7 @@ void __user_alloc_construct (_Tp *__storage, const _Allocator &__a, _Args &&...
__storage, __a, _VSTD::forward<_Args>(__args)...
);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // _LIBCPP_CXX03_LANG
_LIBCPP_END_NAMESPACE_STD
diff --git a/libcxx/include/functional b/libcxx/include/functional
index 15e672e0efc..386fe678bff 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -1264,7 +1264,7 @@ private:
public:
_LIBCPP_INLINE_VISIBILITY __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
// invoke
template <class... _ArgTypes>
_LIBCPP_INLINE_VISIBILITY
@@ -1454,7 +1454,7 @@ bool __not_null(function<_Fp> const& __f) { return !!__f; }
} // namespace __function
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
namespace __function {
@@ -1983,7 +1983,7 @@ void
swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCEPT
{return __x.swap(__y);}
-#else // _LIBCPP_HAS_NO_VARIADICS
+#else // _LIBCPP_CXX03_LANG
#include <__functional_03>
@@ -2047,7 +2047,7 @@ struct __is_placeholder<placeholders::__ph<_Np> >
: public integral_constant<int, _Np> {};
-#ifndef _LIBCPP_HAS_NO_VARIADICS
+#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Uj>
inline _LIBCPP_INLINE_VISIBILITY
@@ -2347,7 +2347,7 @@ bind(_Fp&& __f, _BoundArgs&&... __bound_args)
return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
}
-#endif // _LIBCPP_HAS_NO_VARIADICS
+#endif // _LIBCPP_CXX03_LANG
#if _LIBCPP_STD_VER > 14
OpenPOWER on IntegriCloud