Index: libstdc++-v3/include/std/functional =================================================================== --- libstdc++-v3/include/std/functional (revision 156220) +++ libstdc++-v3/include/std/functional (working copy) @@ -234,12 +234,12 @@ */ template inline - typename __gnu_cxx::__enable_if< + typename enable_if< (!is_member_pointer<_Functor>::value && !is_function<_Functor>::value && !is_function::type>::value), typename result_of<_Functor(_Args...)>::type - >::__type + >::type __invoke(_Functor& __f, _Args&&... __args) { return __f(std::forward<_Args>(__args)...); @@ -248,11 +248,11 @@ // To pick up function references (that will become function pointers) template inline - typename __gnu_cxx::__enable_if< + typename enable_if< (is_pointer<_Functor>::value && is_function::type>::value), typename result_of<_Functor(_Args...)>::type - >::__type + >::type __invoke(_Functor __f, _Args&&... __args) { return __f(std::forward<_Args>(__args)...); @@ -769,22 +769,18 @@ */ template struct is_bind_expression - { static const bool value = false; }; + : false_type + { }; - template - const bool is_bind_expression<_Tp>::value; - /** * @brief Determines if the given type _Tp is a placeholder in a * bind() expression and, if so, which placeholder it is. [TR1 3.6.2] */ template struct is_placeholder - { static const int value = 0; }; + : integral_constant + { }; - template - const int is_placeholder<_Tp>::value; - /// The type of placeholder objects defined by libstdc++. template struct _Placeholder { }; @@ -837,11 +833,9 @@ */ template struct is_placeholder<_Placeholder<_Num> > - { static const int value = _Num; }; + : integral_constant + { }; - template - const int is_placeholder<_Placeholder<_Num> >::value; - /** * Stores a tuple of indices. Used by bind() to extract the elements * in a tuple. @@ -1346,19 +1340,15 @@ /// Class template _Bind is always a bind expression. template struct is_bind_expression<_Bind<_Signature> > - { static const bool value = true; }; + : true_type + { }; - template - const bool is_bind_expression<_Bind<_Signature> >::value; - /// Class template _Bind_result is always a bind expression. template struct is_bind_expression<_Bind_result<_Result, _Signature> > - { static const bool value = true; }; + : true_type + { }; - template - const bool is_bind_expression<_Bind_result<_Result, _Signature> >::value; - /// bind template inline @@ -1850,8 +1840,8 @@ */ template function(_Functor __f, - typename __gnu_cxx::__enable_if< - !is_integral<_Functor>::value, _Useless>::__type + typename enable_if< + !is_integral<_Functor>::value, _Useless>::type = _Useless()); /** @@ -1927,8 +1917,7 @@ * reference_wrapper, this function will not throw. */ template - typename __gnu_cxx::__enable_if::value, - function&>::__type + typename enable_if::value, function&>::type operator=(_Functor&& __f) { function(std::forward<_Functor>(__f)).swap(*this); @@ -1937,8 +1926,7 @@ /// @overload template - typename __gnu_cxx::__enable_if::value, - function&>::__type + typename enable_if::value, function&>::type operator=(reference_wrapper<_Functor> __f) { function(__f).swap(*this); @@ -2059,8 +2047,8 @@ template function<_Res(_ArgTypes...)>:: function(_Functor __f, - typename __gnu_cxx::__enable_if< - !is_integral<_Functor>::value, _Useless>::__type) + typename enable_if< + !is_integral<_Functor>::value, _Useless>::type) : _Function_base() { typedef _Function_handler<_Signature_type, _Functor> _My_handler;