mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Specialized enable_borrowed_ranges for VectorwiseOp class range iteration
libeigen/eigen!2127 Closes #2882
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
1a2b80727c
commit
d0654a201b
@@ -732,4 +732,14 @@ EIGEN_DEVICE_FUNC inline typename DenseBase<Derived>::RowwiseReturnType DenseBas
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
/* Enable use of VectorwiseOp types inside
|
||||
* of std::ranges algorithms. */
|
||||
#if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L
|
||||
namespace std {
|
||||
template <typename VecwiseOp, Eigen::DirectionType Direction>
|
||||
inline constexpr bool ranges::enable_borrowed_range<Eigen::internal::subvector_stl_iterator<VecwiseOp, Direction>> =
|
||||
true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // EIGEN_PARTIAL_REDUX_H
|
||||
|
||||
Reference in New Issue
Block a user