// PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate support for class template argument deduction. // { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); } template struct fixed_string { constexpr static std::size_t length = N; constexpr fixed_string(...) { } // auto operator<=> (const fixed_string&) = default; }; template fixed_string(const CharT (&str)[N]) -> fixed_string; template constexpr std::size_t operator ""_udl() { return decltype(fs)::length; } static_assert("test"_udl == 5);