From e2e557e273f855c3575472d33f111756e4566266 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 25 Aug 2019 06:47:15 -0700 Subject: [PATCH] Remove preparator --- include/fmt/compile.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 6b12a50f..5fff7020 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -494,18 +494,6 @@ class parts_container { private: Container parts_; }; - -// Delegate preparing to preparator, to take advantage of a partial -// specialization. -template struct preparator { - using container = parts_container>; - using prepared_format_type = - typename basic_prepared_format::type; - - static auto prepare(Format format) -> prepared_format_type { - return prepared_format_type(std::move(format)); - } -}; } // namespace internal #if FMT_USE_CONSTEXPR @@ -519,11 +507,11 @@ FMT_CONSTEXPR auto compile(S format_str) { template auto compile(const Char (&format_str)[N]) -> - typename internal::preparator, - Args...>::prepared_format_type { + typename internal::basic_prepared_format, + internal::parts_container, + Args...>::type { const auto view = basic_string_view(format_str, N - 1); - return internal::preparator, Args...>::prepare( - internal::to_runtime_format(view)); + return internal::to_runtime_format(view); } template