diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 266644e4..8df4fd46 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -417,31 +417,26 @@ struct compiletime_parts_provider { return prepared_parts; } }; - -template -using basic_prepared_format = internal::prepared_format< - Format, - conditional_t::value, - compiletime_parts_provider< - Format, typename compiletime_prepared_parts_type_provider< - Format>::type>, - runtime_parts_provider>, - Args...>; } // namespace internal #if FMT_USE_CONSTEXPR template ::value)> -FMT_CONSTEXPR auto compile(S format_str) { - return internal::basic_prepared_format(format_str); +FMT_CONSTEXPR auto compile(S format_str) -> internal::prepared_format< + S, + internal::compiletime_parts_provider< + S, + typename internal::compiletime_prepared_parts_type_provider::type>, + Args...> { + return format_str; } #endif template -auto compile(const Char (&format_str)[N]) - -> internal::basic_prepared_format, - std::vector>, - Args...> { +auto compile(const Char (&format_str)[N]) -> internal::prepared_format< + std::basic_string, + internal::runtime_parts_provider>>, + Args...> { return std::basic_string(format_str, N - 1); }