This revision was automatically updated to reflect the committed changes. Closed by commit rL285572: Fix archetypes.hpp under libcpp-no-extensions and std level < 14 (authored by rogfer01).
Changed prior to commit: https://reviews.llvm.org/D26147?vs=76393&id=76399#toc Repository: rL LLVM https://reviews.llvm.org/D26147 Files: libcxx/trunk/test/support/archetypes.hpp Index: libcxx/trunk/test/support/archetypes.hpp =================================================================== --- libcxx/trunk/test/support/archetypes.hpp +++ libcxx/trunk/test/support/archetypes.hpp @@ -147,15 +147,15 @@ protected: constexpr static int check_value(int const& val) { #if TEST_STD_VER < 14 - return val == -1 || val == 999 ? TEST_THROW(42) : val; + return val == -1 || val == 999 ? (TEST_THROW(42), 0) : val; #else assert(val != -1); assert(val != 999); return val; #endif } constexpr static int check_value(int& val, int val_cp = 0) { #if TEST_STD_VER < 14 - return val_cp = val, val = -1, (val_cp == -1 || val_cp == 999 ? TEST_THROW(42) : val_cp); + return val_cp = val, val = -1, (val_cp == -1 || val_cp == 999 ? (TEST_THROW(42), 0) : val_cp); #else assert(val != -1); assert(val != 999); val_cp = val;
Index: libcxx/trunk/test/support/archetypes.hpp =================================================================== --- libcxx/trunk/test/support/archetypes.hpp +++ libcxx/trunk/test/support/archetypes.hpp @@ -147,15 +147,15 @@ protected: constexpr static int check_value(int const& val) { #if TEST_STD_VER < 14 - return val == -1 || val == 999 ? TEST_THROW(42) : val; + return val == -1 || val == 999 ? (TEST_THROW(42), 0) : val; #else assert(val != -1); assert(val != 999); return val; #endif } constexpr static int check_value(int& val, int val_cp = 0) { #if TEST_STD_VER < 14 - return val_cp = val, val = -1, (val_cp == -1 || val_cp == 999 ? TEST_THROW(42) : val_cp); + return val_cp = val, val = -1, (val_cp == -1 || val_cp == 999 ? (TEST_THROW(42), 0) : val_cp); #else assert(val != -1); assert(val != 999); val_cp = val;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits