Skip to content

Commit

Permalink
replace fold expressions in extents.hpp with macro
Browse files Browse the repository at this point in the history
Use the `_MDSPAN_FOLD_AND` macro to avoid using fold expressions
when building for C++14.
  • Loading branch information
oliverlee committed Feb 13, 2024
1 parent 6ea9d5d commit 42d82ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/experimental/__p0009_bits/extents.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ __check_compatible_extents(
template<class IndexType, class ... Arguments>
MDSPAN_INLINE_FUNCTION
static constexpr bool are_valid_indices() {
return
(std::is_convertible<Arguments, IndexType>::value && ... && true) &&
(std::is_nothrow_constructible<IndexType, Arguments>::value && ... && true);
return
_MDSPAN_FOLD_AND(std::is_convertible<Arguments, IndexType>::value) &&
_MDSPAN_FOLD_AND(std::is_nothrow_constructible<IndexType, Arguments>::value);
}

// ------------------------------------------------------------------
Expand Down

0 comments on commit 42d82ad

Please sign in to comment.