[libcxx-commits] [libcxx] b6399e8 - Revert "[libc++] NFC: Parenthesize expression to satisfy GCC 11"

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 27 10:41:05 PDT 2021


Author: Louis Dionne
Date: 2021-05-27T13:42:39-04:00
New Revision: b6399e85d80d2bea522e4bce1c8c3744e45673e2

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

LOG: Revert "[libc++] NFC: Parenthesize expression to satisfy GCC 11"

That fix was actually incorrect and caused tests to start failing.

Added: 
    

Modified: 
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/check_round_trip.h

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/check_round_trip.h b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/check_round_trip.h
index d7057ec5d5e53..ed2f6c218704f 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/check_round_trip.h
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/check_round_trip.h
@@ -20,7 +20,7 @@ constexpr void check_round_trip(stride_counting_iterator<I> const& i, std::ptrdi
 template <std::random_access_iterator I>
 constexpr void check_round_trip(stride_counting_iterator<I> const& i, std::ptr
diff _t const n) {
   assert(i.stride_count() <= 1);
-  assert(i.stride_displacement() == (n < 0 ? -1 : 1));
+  assert(i.stride_displacement() == n < 0 ? -1 : 1);
 }
 
 template <std::input_or_output_iterator I>


        


More information about the libcxx-commits mailing list