[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Andrew Pinski changed: What|Removed |Added CC||janschultke at googlemail dot com --- Comment #10 from Andrew Pinski --- *** Bug 111662 has been marked as a duplicate of this bug. ***
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Andrew Pinski changed: What|Removed |Added Target Milestone|5.5 |---
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Richard Biener changed: What|Removed |Added Target Milestone|5.4 |5.5 --- Comment #9 from Richard Biener --- GCC 5.4 is being released, adjusting target milestone.
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Richard Biener changed: What|Removed |Added Target Milestone|5.3 |5.4 --- Comment #8 from Richard Biener --- GCC 5.3 is being released, adjusting target milestone.
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|5.2 |5.3 --- Comment #7 from Richard Biener rguenth at gcc dot gnu.org --- GCC 5.2 is being released, adjusting target milestone to 5.3.
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Target Milestone|5.0 |5.2 --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org --- GCC 5.1 has been released.
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 --- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com --- I'm going to save some debugging notes, mostly about non-variadic vs variadic. First one: the tsubst in fn_type_unification: fntype = tsubst (TREE_TYPE (fn), explicit_targs, complain | tf_partial, NULL_TREE); working on TREE_TYPE (fn) which has uses_template_parms true, returns a fntype which has uses_template_parms false in the non-variadic case, still true in the variadic case. Note that later uses_template_parms matters at the beginning of unify_one_argument.
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com Target Milestone|--- |4.10.0 --- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com --- Mine.
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added CC|volumedriverteam@cloudfound | |ers.com | --- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com --- Thus boils down to: templatetypename... Args void wrapper(void (*f)(Args...), Args...); void myfun(int); void test() { const int b = 0; wrapperconst int(myfun, b); } where a non-variadic version is fine. Figuring out where the cv-qualifier is treated differently in the two cases should be relatively easy...
[Bug c++/60608] Template argument problem
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 --- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com --- Slightly shorter: templatetypename... Args void wrapper(void (*f)(Args...)); void myfun(int); void test() { wrapperconst int(myfun); }
[Bug c++/60608] Template argument problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60608 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Keywords||rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed||2014-03-21 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org --- (In reply to volumedriverteam from comment #0) void myfun2(const int) Top-level const is removed from function parameters, so this function is equivalent to: void myfun2(int); And the instantiation wrapperconst int is equivalent to: template void wrapperconst int(void (*)(int), int); G++ gets confused trying to match const int to int somewhere. f.cc: In function ‘void test()’: f.cc:31:33: error: no matching function for call to ‘wrapper(void ()(int), const int)’ wrapperconst int(myfun2, b); ^ f.cc:31:33: note: candidate is: f.cc:4:1: note: templateclass ... Args void wrapper(void (*)(Args ...), Args ...) wrapper(void (*f)(Args...), ^ f.cc:4:1: note: template argument deduction/substitution failed: f.cc:31:33: note: mismatched types ‘const int’ and ‘int’ wrapperconst int(myfun2, b); ^