http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46719
Eric Lawless <eplawless+gcc at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
--- Comment #6 from Eric Lawless <eplawless+gcc at gmail dot com> 2010-11-30
22:46:46 UTC ---
I think I did a bad job describing the issue, and I think that it's still a
problem. I'd like to clarify it if I can. The following code works:
template <typename Return, typename... Args>
int curry(function<Return(double)> func) // NOTE: double
{
return 0;
}
int f(double x)
{
return 0;
}
int main()
{
curry<int, double>(f);
}
While this does not:
template <typename Return, typename... Args>
int curry(function<Return(Args...)> func) // NOTE: Args...
{
return 0;
}
int f(double x)
{
return 0;
}
int main()
{
curry<int, double>(f);
}
Even though the template parameter pack Args expands to double, GCC is unable
to match f to the type function<int(double)> if I use Args..., where it was
able to with the first example where I used double explicitly.
This is the error I receive:
error: no matching function for call to ‘curry(int (&)(double))’
Thanks for your time.