[Bug libstdc++/49058] [C++0x] Bind no-arguments functor failed using std::bind with -pedantic option.
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Sun May 22 22:51:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49058
--- Comment #13 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-22 22:17:10 UTC ---
What about creating an artificially dependent context, thus amenable to SFINAE,
like:
// Call as const
template<typename... _Args, typename _Result
= decltype( std::declval<typename conditional<(sizeof...(_Args) >= 0),
typename add_const<_Functor>::type,
typename add_const<_Functor>::type>::type>()
(
_Mu<_Bound_args>()( std::declval<const _Bound_args&>(),
std::declval<tuple<_Args...>&>() )... ) )>
_Result
More information about the Gcc-bugs
mailing list