mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-11 06:20:25 +08:00
c++: Add test for PR96268.
This works since the recent r11-7102, but we didn't have a test for a template-argument context. gcc/testsuite/ChangeLog: PR c++/96268 * g++.dg/cpp2a/nontype-class41.C: New test.
This commit is contained in:
parent
bc56d27de9
commit
b64551af51
13
gcc/testsuite/g++.dg/cpp2a/nontype-class41.C
Normal file
13
gcc/testsuite/g++.dg/cpp2a/nontype-class41.C
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/96268
|
||||
// { dg-do compile { target c++20 } }
|
||||
|
||||
template <int N>
|
||||
struct static_string { char chars[N]; /* operator<=> */ };
|
||||
|
||||
template <int N>
|
||||
static_string(char const(&)[N]) -> static_string<N>;
|
||||
|
||||
static_string hi = {"hi"};
|
||||
|
||||
template <static_string str> struct name {};
|
||||
using Hi = name<{"hi"}>;
|
Loading…
x
Reference in New Issue
Block a user