[libcxx] r300646 - Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in the functional library

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 18 18:28:48 PDT 2017


Author: ericwf
Date: Tue Apr 18 20:28:47 2017
New Revision: 300646

URL: http://llvm.org/viewvc/llvm-project?rev=300646&view=rev
Log:
Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in the functional library

Modified:
    libcxx/trunk/include/__functional_base
    libcxx/trunk/include/functional

Modified: libcxx/trunk/include/__functional_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base?rev=300646&r1=300645&r2=300646&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base (original)
+++ libcxx/trunk/include/__functional_base Tue Apr 18 20:28:47 2017
@@ -251,7 +251,7 @@ struct __weak_result_type<_Rp (_Cp::*)(_
 };
 
 
-#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::*)(_
     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 *__stor
              __storage, __a, _VSTD::forward<_Args>(__args)...
         );
 }
-#endif  // _LIBCPP_HAS_NO_VARIADICS
+#endif  // _LIBCPP_CXX03_LANG
 
 _LIBCPP_END_NAMESPACE_STD
 

Modified: libcxx/trunk/include/functional
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/functional?rev=300646&r1=300645&r2=300646&view=diff
==============================================================================
--- libcxx/trunk/include/functional (original)
+++ libcxx/trunk/include/functional Tue Apr 18 20:28:47 2017
@@ -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
 
 } // 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::__
     : 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_
     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
 




More information about the cfe-commits mailing list