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++/46719] [C++0x] Cannot call variadic function template


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46719

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-30 22:14:57 UTC ---
And here's an even simpler version without variadic templates or any other
C++0x features:

template <typename R>
    struct function
    {
        template<typename F> function(F) { }
    };

template <typename R>
    int
    curry(function<R> func)
    {
        return 0;
    }

double f(int x) { return x; }

int main()
{
    return curry( f );
}


G++ is correct to reject this, there's no way to deduce R


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