diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 3a341f23ada0..08d9427ff24f 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -41,16 +41,6 @@ namespace detail { # define FMT_COMPILE(s) FMT_STRING(s) #endif -#if FMT_USE_NONTYPE_TEMPLATE_ARGS -template Str> -struct udl_compiled_string : compiled_string { - using char_type = Char; - constexpr explicit operator basic_string_view() const { - return {Str.data, N - 1}; - } -}; -#endif - template auto first(const T& value, const Tail&...) -> const T& { return value; @@ -538,9 +528,7 @@ void print(const S& fmt, const Args&... args) { #if FMT_USE_NONTYPE_TEMPLATE_ARGS inline namespace literals { template constexpr auto operator""_cf() { - using char_t = remove_cvref_t; - return detail::udl_compiled_string(); + return FMT_COMPILE(Str.data); } } // namespace literals #endif