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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-01-28
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Note that clang also rejects that::

clang++ pr91008.cc -c -O2 -c -Wall -Wpedantic -std=c++2a
pr91008.cc:9:19: error: a non-type template parameter cannot have type 'struct
B'
template <struct B> struct X { };
                  ^
pr91008.cc:11:11: error: value of type 'B' is not implicitly convertible to
'int'
typedef X<B{ }> XB;
          ^~~~
pr91008.cc:12:11: error: value of type 'B' is not implicitly convertible to
'int'
typedef X<B{ 0 }> XB;
          ^~~~~~
pr91008.cc:13:11: error: value of type 'B' is not implicitly convertible to
'int'
typedef X<B{ 0, 0 }> XB;
          ^~~~~~~~~
4 errors generated.

Reply via email to