diff --git a/include/fmt/printf.h b/include/fmt/printf.h index 4b0b692c..de7036b3 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -578,33 +578,30 @@ struct printf_context { std::back_insert_iterator, typename Buffer::value_type> type; }; -typedef basic_format_args::type> printf_args; -typedef basic_format_args::type> wprintf_args; - typedef printf_context::type printf_char_context; typedef printf_context::type printf_wchar_context; +typedef basic_format_args printf_args; +typedef basic_format_args wprintf_args; /** \rst Constructs an `~fmt::format_arg_store` object that contains references to - arguments and can be implicitly converted to `~fmt::printf_args`. `Context` - can be omitted in which case it defaults to `~fmt::printf_char_context`. + arguments and can be implicitly converted to `~fmt::printf_args`. \endrst */ -template -inline format_arg_store +template +inline format_arg_store make_printf_args(const Args &... args) { return {args...}; } /** \rst Constructs an `~fmt::format_arg_store` object that contains references to - arguments and can be implicitly converted to `~fmt::wprintf_args`. `Context` - can be omitted in which case it defaults to `~fmt::printf_wchar_context`. + arguments and can be implicitly converted to `~fmt::wprintf_args`. \endrst */ -template -inline format_arg_store +template +inline format_arg_store make_wprintf_args(const Args &... args) { return {args...}; } diff --git a/test/printf-test.cc b/test/printf-test.cc index c51e7f27..414314c9 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -520,7 +520,7 @@ TEST(PrintfTest, CheckFormatStringRegression) { } -TEST(PrintfTest, VSPrintfMessageExample) { +TEST(PrintfTest, VSPrintfMakeArgsExample) { EXPECT_EQ( "[42] something happened", fmt::vsprintf( @@ -528,7 +528,7 @@ TEST(PrintfTest, VSPrintfMessageExample) { } -TEST(PrintfTest, VSPrintfWMessageExample) { +TEST(PrintfTest, VSPrintfMakeWArgsExample) { EXPECT_EQ( L"[42] something happened", fmt::vsprintf(