Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/nontype-class5.C

raw
1 // Example from P0732
2 // { dg-do compile { target c++20 } }
3
4 template<class T, T p> class X {
5 /* ... */
6 };
7
8 struct A {
9 constexpr A(const char*) {}
10 // auto operator<=> (const A&) = default;
11 };
12 X<A, "Pyrophoricity"> x3; // OK: string literal is a constructor argument to A