Skip to content

Commit

Permalink
make sure we're using the cxx17 check correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dmah42 committed Jan 8, 2025
1 parent 59e7cd7 commit 9f4be47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/benchmark/benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
// This _MSC_VER check should detect VS 2017 v15.3 and newer.
#if __cplusplus >= 201703L || \
(defined(_MSC_VER) && _MSC_VER >= 1911 && _MSVC_LANG >= 201703L)
// CXX17 implies CXX11
#define BENCHMARK_HAS_CXX11
#define BENCHMARK_HAS_CXX17
#endif

Expand Down
8 changes: 8 additions & 0 deletions src/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
#define BENCHMARK_HAS_CXX11
#endif

// This _MSC_VER check should detect VS 2017 v15.3 and newer.
#if __cplusplus >= 201703L || \
(defined(_MSC_VER) && _MSC_VER >= 1911 && _MSVC_LANG >= 201703L)
// CXX17 implies CXX11
#define BENCHMARK_HAS_CXX11
#define BENCHMARK_HAS_CXX17
#endif

namespace benchmark {
namespace internal {

Expand Down

0 comments on commit 9f4be47

Please sign in to comment.