[Bug c++/42132] [C++0x] SFINAE failure with cv-qualifiers
redi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Nov 22 17:32:00 GMT 2009
------- Comment #9 from redi at gcc dot gnu dot org 2009-11-22 17:32 -------
I'll try that now. Something like:
template<typename F>
struct Bind
{
F func;
template<typename... Arg, typename SfinaeT = decltype( declval<F>()
(declval<Arg>()...) )>
typename result_of<F(Arg...)>::type
call(Arg&&... a)
{
return func( std::forward<Arg>(a)... );
}
template<typename... Arg, typename SfinaeT = decltype( declval<const F>()
(declval<Arg>()...) )>
typename result_of<const F(Arg...)>::type
call(Arg&&... a) const
{
return func( std::forward<Arg>(a)... );
}
};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42132
More information about the Gcc-bugs
mailing list