diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 94dd42c2..ab1ee2bb 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -676,26 +676,12 @@ auto do_compile(const Format& format) return preparator::prepare(format); } #endif + +template using prepared_format_t = + typename basic_prepared_format< + std::string, parts_container, Args...>::type; } // namespace internal -template struct prepared_format { - typedef typename internal::basic_prepared_format< - std::string, internal::parts_container, Args...>::type type; -}; - -template struct wprepared_format { - typedef typename internal::basic_prepared_format< - std::wstring, internal::parts_container, Args...>::type type; -}; - -template -using prepared_format_t = typename internal::basic_prepared_format< - std::string, internal::parts_container, Args...>::type; - -template -using wprepared_format_t = typename internal::basic_prepared_format< - std::wstring, internal::parts_container, Args...>::type; - #if FMT_USE_CONSTEXPR template diff --git a/test/compile-test.cc b/test/compile-test.cc index c0bf7689..a5c086fd 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -476,7 +476,7 @@ TEST(PrepareTest, CopyPreparedFormat_InternalStringViewsAreNotInvalidated) { } TEST(PrepareTest, ReusedPreparedFormatType) { - typedef fmt::prepared_format::type prepared_format; + using prepared_format = fmt::internal::prepared_format_t; prepared_format prepared = fmt::compile("The {} is {}."); EXPECT_EQ("The answer is 42.", prepared.format("answer", 42));