-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Approx::operator() not const-correct #2273
Labels
Comments
Sorry forgot to add error message:
|
Makes sense to have it const-qualified. If you want the fix to be in v2, PRs are welcome 😃 |
horenmar
added a commit
that referenced
this issue
Aug 26, 2021
rupertnash
added a commit
to rupertnash/Catch2
that referenced
this issue
Sep 17, 2021
horenmar
pushed a commit
that referenced
this issue
Sep 18, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The
Approx
type has an overload oftemplate <typename T, ...SFINAE...> Approx operator()(T const&)
which (correct me if I'm wrong) is meant to be a factory function for instances that have the same epsilon, margin, and scale, but that use the passed value.AFAICT this should be const on the instance, but it's not.
Minimum failing example:
Expected behavior
Above test compiles, runs and passes.
Reproduction steps
See above.
Platform information:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: