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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|aoliva at gcc dot gnu.org          |unassigned at gcc dot 
gnu.org

--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
This fails for the same reason, with -std=c++2a:

struct C { C *c; };
template < C > struct D;
D < &C::c > d;

convert_nontype_argument doesn't even try to convert the template argument to
CLASS_TYPEs, it just asserts same_type, which, in these cases, fails.

IIUC it should attempt some constexpr conversion, but I'm not positive about
that.  Presumably we can reuse the code we use to initialize a global
constexpr, including ctor overload resolution and whatnot, but I'm not sure the
requirements for template arguments of literal class types are the same as
those for constexpr variable initialization.

Anyway, I certainly won't be able to look at this again for an entire week, so
I'll unassign it for the time being, so that anyone can feel free to take it
over.

Reply via email to