-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] DoNotOptimize(T &&)
should not be deprecated
#1584
Comments
@ckennelly is the expert. i defer to them. |
Bumping this because I share @davidstone's opinion and also because I have to deal with about 50 warnings caused by this change. |
bgaifullin
added a commit
to bgaifullin/benchmark
that referenced
this issue
Jun 12, 2023
This was referenced Jun 12, 2023
dmah42
pushed a commit
that referenced
this issue
Jun 19, 2023
* Fix pass rvalue to DoNotOptimize #1584 * Add test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In #1493, the
T const &
overload ofDoNotOptimize
was deprecated because the compiler is still able to make assumptions about the value of the variable. However, it is unclear whether this concern would apply to an rvalue reference overload.To reproduce
Expected behavior
No warning is emitted.
The text was updated successfully, but these errors were encountered: