[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.