Simplify UDL

This commit is contained in:
Victor Zverovich 2022-03-22 17:43:37 -07:00
parent 36d95c9fcc
commit 3c4273dd09

View File

@ -3333,11 +3333,9 @@ inline namespace literals {
\endrst \endrst
*/ */
# if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS # if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
template <detail_exported::fixed_string Str> template <detail_exported::fixed_string Str> constexpr auto operator""_a() {
constexpr auto operator""_a() using char_t = remove_cvref_t<decltype(Str.data[0])>;
-> detail::udl_arg<remove_cvref_t<decltype(Str.data[0])>, return detail::udl_arg<char_t, sizeof(Str.data) / sizeof(char_t), Str>();
sizeof(Str.data) / sizeof(decltype(Str.data[0])), Str> {
return {};
} }
# else # else
constexpr auto operator"" _a(const char* s, size_t) -> detail::udl_arg<char> { constexpr auto operator"" _a(const char* s, size_t) -> detail::udl_arg<char> {