Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark Values::at return type as const #608

Merged
merged 3 commits into from
Nov 30, 2020
Merged

Mark Values::at return type as const #608

merged 3 commits into from
Nov 30, 2020

Conversation

varunagrawal
Copy link
Collaborator

Fixes #606

@varunagrawal varunagrawal added bugfix Fixes an issue or bug quick-review Quick and easy PR to review labels Nov 19, 2020
@varunagrawal varunagrawal self-assigned this Nov 19, 2020
@jlblancoc
Copy link
Member

In principle... it LGTM. However, if you don't mind, please wait until I add a minimal unit test failing before, passing after, ok? I would push directly here to your branch, ok?

@varunagrawal
Copy link
Collaborator Author

Sounds great!

@jlblancoc
Copy link
Member

This fixes my original problem, thanks!
However, I can't add tiny unit test to verify that the older code no longer compiles without c++17's if constexpr()... it could be added with c++11 and SFINAE, but it's probably not worth the messy unit test.

But before merging, please check out the additional point I'm adding to #606.

@jlblancoc
Copy link
Member

(just a reminder) this pr is waiting for a design decision by @dellaert in #606 (comment)

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large diff because of formatting changes. Could you undo all formatting changes and just leave the changes for this PR? Also messes up "blame".

@varunagrawal
Copy link
Collaborator Author

@dellaert all done.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@varunagrawal varunagrawal merged commit b0962ed into develop Nov 30, 2020
@varunagrawal varunagrawal deleted the fix/606 branch November 30, 2020 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes an issue or bug quick-review Quick and easy PR to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error-prone assignable lvalue returned by Values.at<T>()
3 participants