replace return type with auto to hopefully fix vs2013 compile error

remove some whitespace
This commit is contained in:
Thomas Novotny 2018-11-21 19:06:53 +01:00
parent 724e3eafd4
commit 2058098a1c

View File

@ -524,12 +524,11 @@ TEST( PrintfTest, VSPrintfMakeArgsExample ) {
fmt::basic_format_args<fmt::printf_context> args(as); fmt::basic_format_args<fmt::printf_context> args(as);
EXPECT_EQ( EXPECT_EQ(
"[42] something happened", fmt::vsprintf("[%d] %s happened", args)); "[42] something happened", fmt::vsprintf("[%d] %s happened", args));
fmt::format_arg_store<fmt::printf_context, int, char[10]> as2 = auto as2 = fmt::make_printf_args(42, "something");
fmt::make_printf_args(42, "something");
fmt::basic_format_args<fmt::printf_context> args2(as2); fmt::basic_format_args<fmt::printf_context> args2(as2);
EXPECT_EQ( EXPECT_EQ(
"[42] something happened", fmt::vsprintf("[%d] %s happened", args2)); "[42] something happened", fmt::vsprintf("[%d] %s happened", args2));
//the older gcc versions can"t cast the return value //the older gcc versions can't cast the return value
#if !defined(__GNUC__) || (__GNUC__ > 4) #if !defined(__GNUC__) || (__GNUC__ > 4)
EXPECT_EQ( EXPECT_EQ(
"[42] something happened", "[42] something happened",
@ -545,11 +544,11 @@ TEST( PrintfTest, VSPrintfMakeWArgsExample ) {
EXPECT_EQ( EXPECT_EQ(
L"[42] something happened", L"[42] something happened",
fmt::vsprintf(L"[%d] %s happened", args)); fmt::vsprintf(L"[%d] %s happened", args));
fmt::format_arg_store<fmt::wprintf_context, int, wchar_t[10]> as2 = auto as2 = fmt::make_wprintf_args(42, L"something");
fmt::make_wprintf_args(42, L"something");
fmt::basic_format_args<fmt::wprintf_context> args2(as2); fmt::basic_format_args<fmt::wprintf_context> args2(as2);
EXPECT_EQ( EXPECT_EQ(
L"[42] something happened", fmt::vsprintf(L"[%d] %s happened", args2)); L"[42] something happened", fmt::vsprintf(L"[%d] %s happened", args2));
// the older gcc versions can't cast the return value
#if !defined(__GNUC__) || (__GNUC__ > 4) #if !defined(__GNUC__) || (__GNUC__ > 4)
EXPECT_EQ( EXPECT_EQ(
L"[42] something happened", L"[42] something happened",