This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64194] [C++14] <unresolved overloaded function type> for function template with auto return
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Jun 2017 14:21:01 +0000
- Subject: [Bug c++/64194] [C++14] <unresolved overloaded function type> for function template with auto return
- Auto-submitted: auto-generated
- References: <bug-64194-4@http.gcc.gnu.org/bugzilla/>
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>);
}