https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64194
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2016-12-21 00:00:00 |2017-6-28 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #0) > It works if the reference to id<int> is uncommented, or if auto id() is > changed to void id() Or by adding something else to trigger the instantiation of the right specialization, e.g. using F = decltype(id<int>); Slightly reduced (it doesn't matter if g has a deduced return type): template <typename Tp> auto id() { } template <typename T> void g(T) { } int main() { // id<int>; // using F = decltype(id<int>); g(id<int>); }