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++/64194] [C++14] <unresolved overloaded function type> for function template with auto return


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>);
}

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