view gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// PR c++/88095
// Test class non-type template parameters for literal operator templates.
// Validate that parameter packs are rejected.
// { dg-do compile { target c++2a } }

struct literal_class {
  constexpr literal_class(...) { }
  // auto operator<=> (const fixed_string&) = default;
};

template <literal_class...>
int operator"" _udl();      // { dg-error "5:literal operator template .int operator\"\"_udl\\(\\). has invalid parameter list" }