diff options
author | Daniel Frey <d.frey@gmx.de> | 2010-01-18 10:41:30 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-01-18 10:41:30 +0000 |
commit | 0238e6c9f27f9b61f2ebcd6193c7c725c7787562 (patch) | |
tree | d64ab792fd8c76affd5f3db040d6f51e4c183776 /libstdc++-v3 | |
parent | 1cfd38bea344c2742a057f23ee636c9d1ccd5bb8 (diff) | |
download | gcc-0238e6c9f27f9b61f2ebcd6193c7c725c7787562.zip gcc-0238e6c9f27f9b61f2ebcd6193c7c725c7787562.tar.gz gcc-0238e6c9f27f9b61f2ebcd6193c7c725c7787562.tar.bz2 |
functional (_Bind<_Functor(_Bound_args...)>:: operator()): "Pass" _Result to __call*.
2010-01-18 Daniel Frey <d.frey@gmx.de>
* include/std/functional (_Bind<_Functor(_Bound_args...)>::
operator()): "Pass" _Result to __call*.
(_Bind<_Functor(_Bound_args...)>::__call*): Adjust, simplify.
From-SVN: r156007
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/std/functional | 52 |
2 files changed, 26 insertions, 32 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 68b31e0..934e65c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2010-01-18 Daniel Frey <d.frey@gmx.de> + + * include/std/functional (_Bind<_Functor(_Bound_args...)>:: + operator()): "Pass" _Result to __call*. + (_Bind<_Functor(_Bound_args...)>::__call*): Adjust, simplify. + 2010-01-18 Johannes Singler <singler@kit.edu> * include/parallel/base.h (__unary_negate): Correct comment. diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 5444f3d..f28490a 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1092,11 +1092,8 @@ namespace std tuple<_Bound_args...> _M_bound_args; // Call unqualified - template<typename... _Args, int... _Indexes> - typename result_of< - _Functor(typename result_of<_Mu<_Bound_args> - (_Bound_args&, tuple<_Args...>&&)>::type...) - >::type + template<typename _Result, typename... _Args, int... _Indexes> + _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) { return _M_f(_Mu<_Bound_args>() @@ -1104,11 +1101,8 @@ namespace std } // Call as const - template<typename... _Args, int... _Indexes> - typename result_of< - const _Functor(typename result_of<_Mu<_Bound_args> - (const _Bound_args&, tuple<_Args...>&&) - >::type...)>::type + template<typename _Result, typename... _Args, int... _Indexes> + _Result __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const { return _M_f(_Mu<_Bound_args>() @@ -1117,11 +1111,8 @@ namespace std #if 0 // Call as volatile - template<typename... _Args, int... _Indexes> - typename result_of< - volatile _Functor(typename result_of<_Mu<_Bound_args> - (volatile _Bound_args&, tuple<_Args...>&&) - >::type...)>::type + template<typename _Result, typename... _Args, int... _Indexes> + _Result __call_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile { @@ -1130,12 +1121,8 @@ namespace std } // Call as const volatile - template<typename... _Args, int... _Indexes> - typename result_of< - const volatile _Functor(typename result_of<_Mu<_Bound_args> - (const volatile _Bound_args&, - tuple<_Args...>&&) - >::type...)>::type + template<typename _Result, typename... _Args, int... _Indexes> + _Result __call_c_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const volatile { @@ -1158,8 +1145,9 @@ namespace std _Result operator()(_Args&&... __args) { - return this->__call(tuple<_Args...>(std::forward<_Args>(__args)...), - _Bound_indexes()); + return this->__call<_Result>(tuple<_Args...> + (std::forward<_Args>(__args)...), + _Bound_indexes()); } // Call as const @@ -1170,9 +1158,9 @@ namespace std _Result operator()(_Args&&... __args) const { - return this->__call_c(tuple<_Args...> - (std::forward<_Args>(__args)...), - _Bound_indexes()); + return this->__call_c<_Result>(tuple<_Args...> + (std::forward<_Args>(__args)...), + _Bound_indexes()); } #if 0 @@ -1184,9 +1172,9 @@ namespace std _Result operator()(_Args&&... __args) volatile { - return this->__call_v(tuple<_Args...> - (std::forward<_Args>(__args)...), - _Bound_indexes()); + return this->__call_v<_Result>(tuple<_Args...> + (std::forward<_Args>(__args)...), + _Bound_indexes()); } // Call as const volatile @@ -1197,9 +1185,9 @@ namespace std _Result operator()(_Args&&... __args) const volatile { - return this->__call_c_v(tuple<_Args...> - (std::forward<_Args>(__args)...), - _Bound_indexes()); + return this->__call_c_v<_Result>(tuple<_Args...> + (std::forward<_Args>(__args)...), + _Bound_indexes()); } #endif }; |