http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paolo.carlini at oracle dot | |com --- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-22 20:44:49 UTC --- Guys, do we have solid reasons to believe that the below totally stupid tweak is not Ok? Because it passes the testsuite and the new testcases here with -pedantic: Index: include/std/functional =================================================================== --- include/std/functional (revision 174039) +++ include/std/functional (working copy) @@ -1210,7 +1210,7 @@ // Call as const template<typename... _Args, typename _Result - = decltype( std::declval<const _Functor>()( + = decltype( std::declval<_Functor>()( _Mu<_Bound_args>()( std::declval<const _Bound_args&>(), std::declval<tuple<_Args...>&>() )... ) )> _Result @@ -1223,7 +1223,7 @@ // Call as volatile template<typename... _Args, typename _Result - = decltype( std::declval<volatile _Functor>()( + = decltype( std::declval<_Functor>()( _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(), std::declval<tuple<_Args...>&>() )... ) )> _Result @@ -1236,7 +1236,7 @@ // Call as const volatile template<typename... _Args, typename _Result - = decltype( std::declval<const volatile _Functor>()( + = decltype( std::declval<_Functor>()( _Mu<_Bound_args>()( std::declval<const volatile _Bound_args&>(), std::declval<tuple<_Args...>&>() )... ) )> _Result