https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97174

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
With an instantiation added:

int main () { N::conv (1); }

we get

t.C: In function 'int main()':
t.C:13:25: error: call of overloaded 'conv(int)' is ambiguous
   13 | int main () { N::conv (1); }
      |                         ^
t.C:6:36: note: candidate: 'std::make_unsigned_t<T> N::conv(T) [with T = int;
std::make_unsigned_t<T> = unsigned int]'
    6 |   typename std::make_unsigned_t<T> conv (T);
      |                                    ^~~~
t.C:10:6: note: candidate: 'long int N::conv(T) [with T = int]'
   10 | long N::conv (T val)
      |      ^

eventually no diagnostic is required for the template definition.

Reply via email to