Skip to content

Commit

Permalink
update standard to C++17 per C++ build support (google#1875)
Browse files Browse the repository at this point in the history
* update standard to C++17 per C++ build support

* disable deadcode checks from clang-tidy

* fix redundant definition of constexpr
  • Loading branch information
dmah42 authored Nov 13, 2024
1 parent 50ffd3e commit 62a321d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
- name: run
shell: bash
working-directory: ${{ runner.workspace }}/_build
run: run-clang-tidy
run: run-clang-tidy -checks=*,-clang-analyzer-deadcode*
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ licenses(["notice"])
COPTS = [
"-pedantic",
"-pedantic-errors",
"-std=c++14",
"-std=c++17",
"-Wall",
"-Wconversion",
"-Wextra",
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if (BENCHMARK_BUILD_32_BITS)
add_required_cxx_compiler_flag(-m32)
endif()

set(BENCHMARK_CXX_STANDARD 14)
set(BENCHMARK_CXX_STANDARD 17)

set(CMAKE_CXX_STANDARD ${BENCHMARK_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED YES)
Expand Down
2 changes: 0 additions & 2 deletions src/perf_counters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
namespace benchmark {
namespace internal {

constexpr size_t PerfCounterValues::kMaxCounters;

#if defined HAVE_LIBPFM

size_t PerfCounterValues::Read(const std::vector<int>& leaders) {
Expand Down
2 changes: 1 addition & 1 deletion test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ platform(
TEST_COPTS = [
"-pedantic",
"-pedantic-errors",
"-std=c++14",
"-std=c++17",
"-Wall",
"-Wconversion",
"-Wextra",
Expand Down

0 comments on commit 62a321d

Please sign in to comment.