Skip to content

Commit

Permalink
Replace spelled out logical operators: breaks Kokkos windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed Jun 14, 2024
1 parent 4d54ab0 commit c3c32bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/experimental/__p0009_bits/layout_stride.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ struct layout_stride {
)
MDSPAN_INLINE_FUNCTION
friend constexpr bool operator!=(const mapping& x, const StridedLayoutMapping& y) noexcept {
return not (x == y);
return !(x == y);
}

MDSPAN_TEMPLATE_REQUIRES(
Expand Down Expand Up @@ -643,7 +643,7 @@ constexpr void validate_strides(with_rank<0>, Layout, const Extents&, const Mapp
template <std::size_t N, class Layout, class Extents, class Mapping>
constexpr void validate_strides(with_rank<N>, Layout, const Extents& ext, const Mapping& other)
{
static_assert(std::is_same<typename Mapping::layout_type, layout_stride>::value and
static_assert(std::is_same<typename Mapping::layout_type, layout_stride>::value &&
(std::is_same<Layout, layout_left>::value or
std::is_same<Layout, layout_right>::value)
, "This function is only intended to validate construction of "
Expand All @@ -657,7 +657,7 @@ constexpr void validate_strides(with_rank<N>, Layout, const Extents& ext, const
const std::size_t s = is_left ? r : N - 1 - r;

MDSPAN_IMPL_PRECONDITION(common_integral_compare(expected_stride, other.stride(s))
and "invalid strides for layout_{left,right}");
&& "invalid strides for layout_{left,right}");

expected_stride *= ext.extent(s);
}
Expand Down
4 changes: 2 additions & 2 deletions include/experimental/__p0009_bits/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace detail {
template <bool check = MDSPAN_IMPL_CHECK_PRECONDITION>
MDSPAN_FUNCTION constexpr void precondition(const char* cond, const char* file, unsigned line)
{
if (not check) { return; }
if (!check) { return; }
// in case the macro doesn't use the arguments for custom macros
(void) cond;
(void) file;
Expand All @@ -164,7 +164,7 @@ MDSPAN_FUNCTION constexpr void precondition(const char* cond, const char* file,

#define MDSPAN_IMPL_PRECONDITION(...) \
do { \
if (not (__VA_ARGS__)) { \
if (!(__VA_ARGS__)) { \
MDSPAN_IMPL_STANDARD_NAMESPACE::detail::precondition(#__VA_ARGS__, __FILE__, __LINE__); \
} \
} while (0)
Expand Down
2 changes: 1 addition & 1 deletion include/experimental/__p2642_bits/layout_padded_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ constexpr void check_padded_layout_converting_constructor_mandates(MDSPAN_IMPL_S
(extents_type::static_extent(idx) != dynamic_extent) &&
(padding_value != dynamic_extent);

static_assert(not statically_determinable or
static_assert(!statically_determinable ||
(padding_value == 0
? _LayoutExtentsType::static_extent(idx) == 0
: _LayoutExtentsType::static_extent(idx) % padding_value == 0),
Expand Down

0 comments on commit c3c32bc

Please sign in to comment.