mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 09:39:34 +08:00
qualify non-const symbolic indexed view with is_lvalue
This commit is contained in:
parent
df1049ddf4
commit
178ef8c97f
@ -97,7 +97,7 @@ operator()(const RowIndices& rowIndices, const ColIndices& colIndices) const {
|
|||||||
|
|
||||||
template <typename RowIndices, typename ColIndices>
|
template <typename RowIndices, typename ColIndices>
|
||||||
std::enable_if_t<internal::valid_indexed_view_overload<RowIndices, ColIndices>::value &&
|
std::enable_if_t<internal::valid_indexed_view_overload<RowIndices, ColIndices>::value &&
|
||||||
internal::traits<IndexedViewType<RowIndices, ColIndices>>::ReturnAsScalar,
|
internal::traits<IndexedViewType<RowIndices, ColIndices>>::ReturnAsScalar && internal::is_lvalue<Derived>::value,
|
||||||
Scalar&>
|
Scalar&>
|
||||||
operator()(const RowIndices& rowIndices, const ColIndices& colIndices) {
|
operator()(const RowIndices& rowIndices, const ColIndices& colIndices) {
|
||||||
return Base::operator()(internal::eval_expr_given_size(rowIndices, rows()),
|
return Base::operator()(internal::eval_expr_given_size(rowIndices, rows()),
|
||||||
@ -174,7 +174,7 @@ operator()(const Indices& indices) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename IndexType>
|
template <typename IndexType>
|
||||||
std::enable_if_t<symbolic::is_symbolic<IndexType>::value, Scalar&> operator()(const IndexType& id) {
|
std::enable_if_t<symbolic::is_symbolic<IndexType>::value && internal::is_lvalue<Derived>::value, Scalar&> operator()(const IndexType& id) {
|
||||||
return Base::operator()(internal::eval_expr_given_size(id, size()));
|
return Base::operator()(internal::eval_expr_given_size(id, size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user