@@ -1941,29 +1941,29 @@ class copy_shape_traits {
1941
1941
* or `sizeof...(LoopOrder)` `index_t` objects in the case of
1942
1942
* `for_all_indices<>`. */
1943
1943
template <size_t ... LoopOrder, class Shape , class Fn ,
1944
- class = internal::enable_if_callable<Fn, typename Shape::index_type> ,
1945
- std:: enable_if_t <( sizeof ...(LoopOrder) == 0 ), int > = 0 >
1944
+ std:: enable_if_t <( sizeof ...(LoopOrder) == 0 ), int > = 0 ,
1945
+ class = internal::enable_if_callable<Fn, typename Shape::index_type> >
1946
1946
NDARRAY_UNIQUE NDARRAY_HOST_DEVICE void for_each_index (const Shape& s, Fn&& fn) {
1947
1947
shape_traits<Shape>::for_each_index (s, fn);
1948
1948
}
1949
1949
template <size_t ... LoopOrder, class Shape , class Fn ,
1950
- class = internal::enable_if_applicable<Fn, typename Shape::index_type> ,
1951
- std:: enable_if_t <( sizeof ...(LoopOrder) == 0 ), int > = 0 >
1950
+ std:: enable_if_t <( sizeof ...(LoopOrder) == 0 ), int > = 0 ,
1951
+ class = internal::enable_if_applicable<Fn, typename Shape::index_type> >
1952
1952
NDARRAY_UNIQUE NDARRAY_HOST_DEVICE void for_all_indices (const Shape& s, Fn&& fn) {
1953
1953
using index_type = typename Shape::index_type;
1954
1954
for_each_index (s, [fn = std::move (fn)](const index_type& i) { internal::apply (fn, i); });
1955
1955
}
1956
1956
template <size_t ... LoopOrder, class Shape , class Fn ,
1957
- class = internal::enable_if_callable<Fn, index_of_rank< sizeof ...(LoopOrder)>> ,
1958
- std:: enable_if_t <( sizeof ...(LoopOrder) != 0 ), int > = 0 >
1957
+ std:: enable_if_t <( sizeof ...(LoopOrder) != 0 ), int > = 0 ,
1958
+ class = internal::enable_if_callable<Fn, index_of_rank< sizeof ...(LoopOrder)>> >
1959
1959
NDARRAY_UNIQUE NDARRAY_HOST_DEVICE void for_each_index (const Shape& s, Fn&& fn) {
1960
1960
using index_type = index_of_rank<sizeof ...(LoopOrder)>;
1961
1961
for_each_index_in_order (reorder<LoopOrder...>(s),
1962
1962
[fn = std::move (fn)](const index_type& i) { fn (internal::unshuffle<LoopOrder...>(i)); });
1963
1963
}
1964
1964
template <size_t ... LoopOrder, class Shape , class Fn ,
1965
- class = internal::enable_if_callable<Fn, decltype(LoopOrder) ...> ,
1966
- std:: enable_if_t <( sizeof ...(LoopOrder) != 0 ), int > = 0 >
1965
+ std:: enable_if_t <( sizeof ...(LoopOrder) != 0 ), int > = 0 ,
1966
+ class = internal::enable_if_callable<Fn, decltype(LoopOrder) ...> >
1967
1967
NDARRAY_UNIQUE NDARRAY_HOST_DEVICE void for_all_indices (const Shape& s, Fn&& fn) {
1968
1968
using index_type = index_of_rank<sizeof ...(LoopOrder)>;
1969
1969
for_each_index_in_order (reorder<LoopOrder...>(s), [fn = std::move (fn)](const index_type& i) {
0 commit comments