[libcxx-commits] [libcxx] 4051cac - [libc++][NFC] Use brace-init instead of parens to workaround macro expansion in badly behaved systems

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 25 10:18:39 PDT 2022


Author: Louis Dionne
Date: 2022-04-25T11:17:11-06:00
New Revision: 4051cac256d98c49f1c7af3fbaf32520d7885924

URL: https://github.com/llvm/llvm-project/commit/4051cac256d98c49f1c7af3fbaf32520d7885924
DIFF: https://github.com/llvm/llvm-project/commit/4051cac256d98c49f1c7af3fbaf32520d7885924.diff

LOG: [libc++][NFC] Use brace-init instead of parens to workaround macro expansion in badly behaved systems

Added: 
    

Modified: 
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
index 62525ec0c4861..b8386ebdab469 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
@@ -70,7 +70,7 @@ constexpr bool test() {
   {
     // Non-const lvalue.
     {
-      View str("abc def");
+      View str{"abc def"};
       std::ranges::lazy_split_view<View, std::string_view> v(str, " ");
 
       std::same_as<View> decltype(auto) result = v.base();
@@ -80,7 +80,7 @@ constexpr bool test() {
 
     // Const lvalue.
     {
-      View str("abc def");
+      View str{"abc def"};
       const std::ranges::lazy_split_view<View, std::string_view> v(str, " ");
 
       std::same_as<View> decltype(auto) result = v.base();
@@ -90,7 +90,7 @@ constexpr bool test() {
 
     // Non-const rvalue.
     {
-      View str("abc def");
+      View str{"abc def"};
       std::ranges::lazy_split_view<View, std::string_view> v(str, " ");
 
       std::same_as<View> decltype(auto) result = std::move(v).base();
@@ -100,7 +100,7 @@ constexpr bool test() {
 
     // Const rvalue.
     {
-      View str("abc def");
+      View str{"abc def"};
       const std::ranges::lazy_split_view<View, std::string_view> v(str, " ");
 
       std::same_as<View> decltype(auto) result = std::move(v).base();


        


More information about the libcxx-commits mailing list