kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
417 stars 69 forks source link

-Werror=logical-not-parentheses at line 534 in layout_stride.hpp #157

Closed stigrs closed 2 years ago

stigrs commented 2 years ago

g++-10 gives a -Werror=logical-not-parentheses error at line 534 in layout_stride.hpp:

.../mdspan-src/include/experimental/__p0009_bits/layout_stride.hpp:534:16: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
  534 |       return !x==y;
      |                ^~
.../mdspan-src/include/experimental/__p0009_bits/layout_stride.hpp:534:14: note: add parentheses around left hand side expression to silence this warning
  534 |       return !x==y;
      |              ^~
      |              ( )
mhoemmen commented 2 years ago

Thanks for reporting! PR https://github.com/kokkos/mdspan/pull/158 should fix this.