google / benchmark

A microbenchmark support library
Apache License 2.0
8.6k stars 1.57k forks source link

Fix unit tests compilation by non-gnu/msvc compilers with c++11 support. #1691

Closed ivafanas closed 8 months ago

ivafanas commented 8 months ago

donotoptimize_test.cc could not be compiled under non-gnu / non-msvc compilers, because only deprecated version of DoNotOptimize is available for these compilers. Tests are compiled with -Werror. Patch fixes test compilation by providing non-deprecated version of DoNotOptimize for compilers with c++11 standard support.

google-cla[bot] commented 8 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

dmah42 commented 8 months ago

thanks!

ivafanas commented 8 months ago

Thank you too!