This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/42132] [C++0x] SFINAE failure with cv-qualifiers



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]