[libcxx] r337666 - Fix use of C++14 syntax in C++11 filesystem tests.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 22 20:41:46 PDT 2018


Author: ericwf
Date: Sun Jul 22 20:41:46 2018
New Revision: 337666

URL: http://llvm.org/viewvc/llvm-project?rev=337666&view=rev
Log:
Fix use of C++14 syntax in C++11 filesystem tests.

Modified:
    libcxx/trunk/test/support/format_string.hpp

Modified: libcxx/trunk/test/support/format_string.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/format_string.hpp?rev=337666&r1=337665&r2=337666&view=diff
==============================================================================
--- libcxx/trunk/test/support/format_string.hpp (original)
+++ libcxx/trunk/test/support/format_string.hpp Sun Jul 22 20:41:46 2018
@@ -11,7 +11,9 @@ inline std::string format_string_imp(con
   // we might need a second shot at this, so pre-emptivly make a copy
   struct GuardVAList {
     va_list& target;
-    bool active = true;
+    bool active;
+    GuardVAList(va_list& target) : target(target), active(true) {}
+
     void clear() {
       if (active)
         va_end(target);
@@ -24,11 +26,11 @@ inline std::string format_string_imp(con
   };
   va_list args;
   va_start(args, msg);
-  GuardVAList args_guard = {args};
+  GuardVAList args_guard(args);
 
   va_list args_cp;
   va_copy(args_cp, args);
-  GuardVAList args_copy_guard = {args_cp};
+  GuardVAList args_copy_guard(args_cp);
 
   std::array<char, 256> local_buff;
   std::size_t size = local_buff.size();




More information about the cfe-commits mailing list