Skip to content

Commit b2aed1c

Browse files
Try again for older C++
1 parent 1faeb85 commit b2aed1c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

include/pybind11/eigen.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,16 @@ struct eigen_tensor_helper<Eigen::Tensor<Scalar_, NumIndices_, Options_, IndexTy
670670
return true;
671671
}
672672

673+
template <typename T>
674+
struct helper {};
675+
673676
template <size_t... Is>
674-
static constexpr auto get_dimensions_descriptor_helper(index_sequence<Is...>) {
675-
return concat(const_name(((void) Is, "?"))...);
676-
}
677+
struct helper<index_sequence<Is...>> {
678+
static constexpr auto value = concat(const_name(((void) Is, "?"))...);
679+
};
677680

678681
static constexpr auto dimensions_descriptor
679-
= get_dimensions_descriptor_helper(make_index_sequence<T::NumIndices>());
682+
= helper<decltype(make_index_sequence<T::NumIndices>())>::value;
680683
};
681684

682685
template <typename Scalar_, typename std::ptrdiff_t... Indices, int Options_, typename IndexType>

0 commit comments

Comments
 (0)