From fcf476bb023d1825ee351013b005e771fe6f656a Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 16 Dec 2012 09:42:00 -0800 Subject: [PATCH] Fix MSVC build. --- format_test.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/format_test.cc b/format_test.cc index 17f660f6..4e7ad837 100644 --- a/format_test.cc +++ b/format_test.cc @@ -718,6 +718,10 @@ TEST(ActiveFormatterTest, ActionNotCalledOnError) { EXPECT_EQ(0, num_calls); } +// The test doesn't compile on MSVC because the latter follows C++03 and +// requires an accessible copy ctor when binding a temporary to a const +// reference. +#ifndef _MSC_VER TEST(ActiveFormatterTest, ArgLifetime) { // The following code is for testing purposes only. It is a definite abuse // of the API and shouldn't be used in real applications. @@ -729,6 +733,7 @@ TEST(ActiveFormatterTest, ArgLifetime) { // calls Format. EXPECT_EQ("test", str(af)); } +#endif struct PrintError { void operator()(const fmt::Formatter &f) const {