mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Inline compiled format
This commit is contained in:
@ -510,7 +510,8 @@ constexpr auto compile(S format_str) {
|
|||||||
template <typename CompiledFormat, typename... Args,
|
template <typename CompiledFormat, typename... Args,
|
||||||
typename Char = typename CompiledFormat::char_type,
|
typename Char = typename CompiledFormat::char_type,
|
||||||
FMT_ENABLE_IF(detail::is_compiled_format<CompiledFormat>::value)>
|
FMT_ENABLE_IF(detail::is_compiled_format<CompiledFormat>::value)>
|
||||||
std::basic_string<Char> format(const CompiledFormat& cf, const Args&... args) {
|
FMT_INLINE std::basic_string<Char> format(const CompiledFormat& cf,
|
||||||
|
const Args&... args) {
|
||||||
basic_memory_buffer<Char> buffer;
|
basic_memory_buffer<Char> buffer;
|
||||||
detail::buffer<Char>& base = buffer;
|
detail::buffer<Char>& base = buffer;
|
||||||
cf.format(std::back_inserter(base), args...);
|
cf.format(std::back_inserter(base), args...);
|
||||||
|
Reference in New Issue
Block a user