From 006c2546f209baab91e6f0293de593cc88f13884 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 25 Aug 2019 07:57:56 -0700 Subject: [PATCH] Get rid of basic_prepared_format --- include/fmt/compile.h | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) 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); }