gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C
raw| 1 | // PR c++/88095 |
| 2 | // Test class non-type template parameters for literal operator templates. |
| 3 | // Validate that parameter packs are rejected. |
| 4 | // { dg-do compile { target c++20 } } |
| 5 | |
| 6 | struct literal_class { |
| 7 | constexpr literal_class(...) { } |
| 8 | // auto operator<=> (const fixed_string&) = default; |
| 9 | }; |
| 10 | |
| 11 | template <literal_class...> |
| 12 | int operator ""_udl(); // { dg-error "5:literal operator template .int operator\"\"_udl\\(\\). has invalid parameter list" } |