diff options
author | Eric <eric@efcs.ca> | 2017-09-14 15:50:33 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 15:50:33 -0600 |
commit | 6d8339dd97afea4633e54ed4b42307aff4386040 (patch) | |
tree | a344edbd8d134a3d65427a40146ed1eba95c5822 /README.md | |
parent | 2a05f248be98999d14975c409683fd9f1a753ba2 (diff) | |
download | google-benchmark-6d8339dd97afea4633e54ed4b42307aff4386040.tar.gz |
Fix #444 - Use BENCHMARK_HAS_CXX11 over __cplusplus. (#446)
* Fix #444 - Use BENCHMARK_HAS_CXX11 over __cplusplus.
MSVC incorrectly defines __cplusplus to report C++03, despite the compiler
actually providing C++11 or greater. Therefore we have to detect C++11 differently
for MSVC. This patch uses `_MSVC_LANG` which has been defined since
Visual Studio 2015 Update 3; which should be sufficient for detecting C++11.
Secondly this patch changes over most usages of __cplusplus >= 201103L to
check BENCHMARK_HAS_CXX11 instead.
* remove redunant comment
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -185,7 +185,7 @@ BENCHMARK_TEMPLATE(BM_Sequential, WaitQueue<int>)->Range(1<<0, 1<<10); Three macros are provided for adding benchmark templates. ```c++ -#if __cplusplus >= 201103L // C++11 and greater. +#ifdef BENCHMARK_HAS_CXX11 #define BENCHMARK_TEMPLATE(func, ...) // Takes any number of parameters. #else // C++ < C++11 #define BENCHMARK_TEMPLATE(func, arg1) |