diff options
Diffstat (limited to 'libcxx/include/__functional_03')
| -rw-r--r-- | libcxx/include/__functional_03 | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/libcxx/include/__functional_03 b/libcxx/include/__functional_03 index f2880adcfb2..b90676299b7 100644 --- a/libcxx/include/__functional_03 +++ b/libcxx/include/__functional_03 @@ -246,7 +246,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R, class _A0> @@ -265,7 +265,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R, class _A0, class _A1> @@ -284,7 +284,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R, class _A0, class _A1, class _A2> @@ -303,7 +303,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const = 0; virtual const std::type_info& target_type() const = 0; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _FD, class _Alloc, class _FB> class __func; @@ -324,7 +324,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _F, class _Alloc, class _R> @@ -388,7 +388,7 @@ __func<_F, _Alloc, _R()>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI template<class _F, class _Alloc, class _R, class _A0> class __func<_F, _Alloc, _R(_A0)> @@ -406,7 +406,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _F, class _Alloc, class _R, class _A0> @@ -470,7 +470,7 @@ __func<_F, _Alloc, _R(_A0)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI template<class _F, class _Alloc, class _R, class _A0, class _A1> class __func<_F, _Alloc, _R(_A0, _A1)> @@ -488,7 +488,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _F, class _Alloc, class _R, class _A0, class _A1> @@ -552,7 +552,7 @@ __func<_F, _Alloc, _R(_A0, _A1)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2> class __func<_F, _Alloc, _R(_A0, _A1, _A2)> @@ -570,7 +570,7 @@ public: #ifndef _LIBCPP_NO_RTTI virtual const void* target(const type_info&) const; virtual const std::type_info& target_type() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _F, class _Alloc, class _R, class _A0, class _A1, class _A2> @@ -634,7 +634,7 @@ __func<_F, _Alloc, _R(_A0, _A1, _A2)>::target_type() const return typeid(_F); } -#endif +#endif // _LIBCPP_NO_RTTI } // __function @@ -706,7 +706,7 @@ public: const std::type_info& target_type() const; template <typename _T> _T* target(); template <typename _T> const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R> @@ -882,7 +882,7 @@ function<_R()>::operator()() const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(); } @@ -917,7 +917,7 @@ function<_R()>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI template<class _R, class _A0> class function<_R(_A0)> @@ -998,7 +998,7 @@ public: const std::type_info& target_type() const; template <typename _T> _T* target(); template <typename _T> const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R, class _A0> @@ -1174,7 +1174,7 @@ function<_R(_A0)>::operator()(_A0 __a0) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(__a0); } @@ -1209,7 +1209,7 @@ function<_R(_A0)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI template<class _R, class _A0, class _A1> class function<_R(_A0, _A1)> @@ -1290,7 +1290,7 @@ public: const std::type_info& target_type() const; template <typename _T> _T* target(); template <typename _T> const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R, class _A0, class _A1> @@ -1466,7 +1466,7 @@ function<_R(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(__a0, __a1); } @@ -1501,7 +1501,7 @@ function<_R(_A0, _A1)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI template<class _R, class _A0, class _A1, class _A2> class function<_R(_A0, _A1, _A2)> @@ -1581,7 +1581,7 @@ public: const std::type_info& target_type() const; template <typename _T> _T* target(); template <typename _T> const _T* target() const; -#endif +#endif // _LIBCPP_NO_RTTI }; template<class _R, class _A0, class _A1, class _A2> @@ -1758,7 +1758,7 @@ function<_R(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2) const #ifndef _LIBCPP_NO_EXCEPTIONS if (__f_ == 0) throw bad_function_call(); -#endif +#endif // _LIBCPP_NO_EXCEPTIONS return (*__f_)(__a0, __a1, __a2); } @@ -1793,29 +1793,29 @@ function<_R(_A0, _A1, _A2)>::target() const return (const _T*)__f_->target(typeid(_T)); } -#endif +#endif // _LIBCPP_NO_RTTI -template <class _F> +template <class _F> inline _LIBCPP_INLINE_VISIBILITY bool operator==(const function<_F>& __f, nullptr_t) {return !__f;} -template <class _F> +template <class _F> inline _LIBCPP_INLINE_VISIBILITY bool operator==(nullptr_t, const function<_F>& __f) {return !__f;} -template <class _F> +template <class _F> inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const function<_F>& __f, nullptr_t) {return (bool)__f;} -template <class _F> +template <class _F> inline _LIBCPP_INLINE_VISIBILITY bool operator!=(nullptr_t, const function<_F>& __f) {return (bool)__f;} -template <class _F> +template <class _F> inline _LIBCPP_INLINE_VISIBILITY void swap(function<_F>& __x, function<_F>& __y) @@ -1868,7 +1868,6 @@ struct __mu_return1<true, _Ti, _Uj...> typedef typename result_of<_Ti(_Uj...)>::type type; }; - template <class _Ti, class ..._Uj, size_t ..._Indx> inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1<true, _Ti, _Uj...>::type @@ -2006,7 +2005,7 @@ __apply_functor(_F& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); } -template<class _F, class ..._BoundArgs> +template<class _F, class ..._BoundArgs> class __bind { _F __f_; @@ -2024,7 +2023,7 @@ public: operator()(_Args&& ...__args) { // compiler bug workaround - return __apply_functor(__f_, __bound_args_, __indices(), + return __apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(__args...)); } @@ -2032,15 +2031,15 @@ public: typename __bind_return<_F, tuple<_BoundArgs...>, tuple<_Args&&...> >::type operator()(_Args&& ...__args) const { - return __apply_functor(__f_, __bound_args_, __indices(), + return __apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(__args...)); } }; -template<class _F, class ..._BoundArgs> +template<class _F, class ..._BoundArgs> struct __is_bind_expression<__bind<_F, _BoundArgs...> > : public true_type {}; -template<class _R, class _F, class ..._BoundArgs> +template<class _R, class _F, class ..._BoundArgs> class __bind_r : public __bind<_F, _BoundArgs...> { @@ -2068,10 +2067,10 @@ public: } }; -template<class _R, class _F, class ..._BoundArgs> +template<class _R, class _F, class ..._BoundArgs> struct __is_bind_expression<__bind_r<_R, _F, _BoundArgs...> > : public true_type {}; -template<class _F, class ..._BoundArgs> +template<class _F, class ..._BoundArgs> inline _LIBCPP_INLINE_VISIBILITY __bind<typename decay<_F>::type, typename decay<_BoundArgs>::type...> bind(_F&& __f, _BoundArgs&&... __bound_args) @@ -2080,7 +2079,7 @@ bind(_F&& __f, _BoundArgs&&... __bound_args) return type(_STD::forward<_F>(__f), _STD::forward<_BoundArgs>(__bound_args)...); } -template<class _R, class _F, class ..._BoundArgs> +template<class _R, class _F, class ..._BoundArgs> inline _LIBCPP_INLINE_VISIBILITY __bind_r<_R, typename decay<_F>::type, typename decay<_BoundArgs>::type...> bind(_F&& __f, _BoundArgs&&... __bound_args) @@ -2090,4 +2089,4 @@ bind(_F&& __f, _BoundArgs&&... __bound_args) } */ -#endif +#endif // _LIBCPP_FUNCTIONAL_03 |

