Skip to content

fix const-correctness in Matrix class#2527

Open
jewonj0620 wants to merge 1 commit intolballabio:masterfrom
jewonj0620:feature/fix-matrix-const-correctness
Open

fix const-correctness in Matrix class#2527
jewonj0620 wants to merge 1 commit intolballabio:masterfrom
jewonj0620:feature/fix-matrix-const-correctness

Conversation

@jewonj0620
Copy link
Copy Markdown

Split Matrix::operator()(Size, Size) into const and non-const overloads:

  • const overload returns const Real&
  • non-const overload returns Real&

This fixes the previous const-incorrect interface and aligns element access with standard C++ container/value access patterns.

@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Apr 1, 2026

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 74.431%. remained the same
when pulling 1f76162 on jewonj0620:feature/fix-matrix-const-correctness
into 148aff0 on lballabio:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants