Skip to content

Commit 62a321d

Browse files
authored
update standard to C++17 per C++ build support (#1875)
* update standard to C++17 per C++ build support * disable deadcode checks from clang-tidy * fix redundant definition of constexpr
1 parent 50ffd3e commit 62a321d

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

.github/workflows/clang-tidy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
- name: run
3636
shell: bash
3737
working-directory: ${{ runner.workspace }}/_build
38-
run: run-clang-tidy
38+
run: run-clang-tidy -checks=*,-clang-analyzer-deadcode*

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ licenses(["notice"])
33
COPTS = [
44
"-pedantic",
55
"-pedantic-errors",
6-
"-std=c++14",
6+
"-std=c++17",
77
"-Wall",
88
"-Wconversion",
99
"-Wextra",

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ if (BENCHMARK_BUILD_32_BITS)
138138
add_required_cxx_compiler_flag(-m32)
139139
endif()
140140

141-
set(BENCHMARK_CXX_STANDARD 14)
141+
set(BENCHMARK_CXX_STANDARD 17)
142142

143143
set(CMAKE_CXX_STANDARD ${BENCHMARK_CXX_STANDARD})
144144
set(CMAKE_CXX_STANDARD_REQUIRED YES)

src/perf_counters.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
namespace benchmark {
2727
namespace internal {
2828

29-
constexpr size_t PerfCounterValues::kMaxCounters;
30-
3129
#if defined HAVE_LIBPFM
3230

3331
size_t PerfCounterValues::Read(const std::vector<int>& leaders) {

test/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ platform(
1010
TEST_COPTS = [
1111
"-pedantic",
1212
"-pedantic-errors",
13-
"-std=c++14",
13+
"-std=c++17",
1414
"-Wall",
1515
"-Wconversion",
1616
"-Wextra",

0 commit comments

Comments
 (0)