Skip to content

Commit

Permalink
Use .data()[0] pattern for first element.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Feb 5, 2024
1 parent 77c0b28 commit b721d4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/highfive/eigen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct inspector<Eigen::Matrix<T, M, N>> {
}

static size_t getRank(const type& val) {
return ndim + inspector<value_type>::getRank(val[0]);
return ndim + inspector<value_type>::getRank(val.data()[0]);
}

static std::vector<size_t> getDimensions(const type& val) {
Expand Down

0 comments on commit b721d4b

Please sign in to comment.