Commit 006c2546 authored by Victor Zverovich's avatar Victor Zverovich

Get rid of basic_prepared_format

parent 4ce006fb
...@@ -417,31 +417,26 @@ struct compiletime_parts_provider { ...@@ -417,31 +417,26 @@ struct compiletime_parts_provider {
return prepared_parts; return prepared_parts;
} }
}; };
template <typename Format, typename PreparedPartsContainer, typename... Args>
using basic_prepared_format = internal::prepared_format<
Format,
conditional_t<is_compile_string<Format>::value,
compiletime_parts_provider<
Format, typename compiletime_prepared_parts_type_provider<
Format>::type>,
runtime_parts_provider<PreparedPartsContainer>>,
Args...>;
} // namespace internal } // namespace internal
#if FMT_USE_CONSTEXPR #if FMT_USE_CONSTEXPR
template <typename... Args, typename S, template <typename... Args, typename S,
FMT_ENABLE_IF(is_compile_string<S>::value)> FMT_ENABLE_IF(is_compile_string<S>::value)>
FMT_CONSTEXPR auto compile(S format_str) { FMT_CONSTEXPR auto compile(S format_str) -> internal::prepared_format<
return internal::basic_prepared_format<S, void, Args...>(format_str); S,
internal::compiletime_parts_provider<
S,
typename internal::compiletime_prepared_parts_type_provider<S>::type>,
Args...> {
return format_str;
} }
#endif #endif
template <typename... Args, typename Char, size_t N> template <typename... Args, typename Char, size_t N>
auto compile(const Char (&format_str)[N]) auto compile(const Char (&format_str)[N]) -> internal::prepared_format<
-> internal::basic_prepared_format<std::basic_string<Char>, std::basic_string<Char>,
std::vector<internal::format_part<Char>>, internal::runtime_parts_provider<std::vector<internal::format_part<Char>>>,
Args...> { Args...> {
return std::basic_string<Char>(format_str, N - 1); return std::basic_string<Char>(format_str, N - 1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment