[Bug c++/53660] function pointer conversion function template with nested-name-specifier ignored

2021-08-06 Thread potswa at mac dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53660

David Krauss  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from David Krauss  ---
(The standardese mentions "for each … where the conversion-type-id denotes a
type" which excludes the case of being a dependent type.)

[Bug c++/53660] function pointer conversion function template with nested-name-specifier ignored

2021-08-04 Thread potswa at mac dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53660

--- Comment #2 from David Krauss  ---
(In reply to Andrew Pinski from comment #1)
> I don't think this is a bug.

Right, the behavior looks correct.

As for a nested-name-specifier working in this context, it works if it's not
dependent. As for the declaration being a function template, it works as long
as the conversion-type-id is not dependent.

Oddly, a dependent conversion-type-id *is* allowed when the function is not
templated.

Anyway, the standard says to inspect the conversion function declarations and
find the ones referring to function (-pointer, -reference) types. That doesn't
admit application of template default arguments, as implicit or explicit
conversion does.

[Bug c++/53660] function pointer conversion function template with nested-name-specifier ignored

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53660

--- Comment #1 from Andrew Pinski  ---
I don't think this is a bug.

GCC, ICC and clang all reject it the same way.
MSV rejects it with:
(10): error C2783: 'c::operator enable_if<__formal>::t(void)': could
not deduce template argument for 't'