mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
allow pointer_based_stl_iterator to conform to the contiguous_iterator concept if we are in c++20
This commit is contained in:
parent
27f8176254
commit
392b95bdf1
@ -325,7 +325,13 @@ class pointer_based_stl_iterator {
|
||||
public:
|
||||
typedef Index difference_type;
|
||||
typedef typename XprType::Scalar value_type;
|
||||
#if __cplusplus >= 202002L
|
||||
typedef std::conditional_t<XprType::InnerStrideAtCompileTime == 1, std::contiguous_iterator_tag,
|
||||
std::random_access_iterator_tag>
|
||||
iterator_category;
|
||||
#else
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
#endif
|
||||
typedef std::conditional_t<bool(is_lvalue), value_type*, const value_type*> pointer;
|
||||
typedef std::conditional_t<bool(is_lvalue), value_type&, const value_type&> reference;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user