Skip to content

Commit 35a30bb

Browse files
Leander SchultenLeander Schulten
authored andcommitted
Fix #14336: Raise minimum c++ version to c++17
1 parent c9c660e commit 35a30bb

File tree

7 files changed

+10
-18
lines changed

7 files changed

+10
-18
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ project(Cppcheck VERSION 2.18.99 LANGUAGES CXX)
33

44
include(cmake/options.cmake)
55

6-
include(cmake/cxx11.cmake)
7-
use_cxx11()
6+
include(cmake/cxx17.cmake)
7+
use_cxx17()
88
set(CMAKE_CXX_STANDARD_REQUIRED ON)
99
set(CMAKE_CXX_EXTENSIONS OFF)
1010

cmake/cxx11.cmake

Lines changed: 0 additions & 8 deletions
This file was deleted.

cmake/cxx17.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
macro(use_cxx17)
2+
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use")
3+
endmacro()

man/manual-premium.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if it has non-standard syntax, as is common in for example embedded projects.
1515
Supported code and platforms:
1616

1717
- Cppcheck checks non-standard code that contains various compiler extensions, inline assembly code, etc.
18-
- Cppcheck should be compilable by any compiler that supports C++11 or later.
18+
- Cppcheck should be compilable by any compiler that supports C++17 or later.
1919
- Cppcheck is cross platform and is used in various posix/windows/etc environments.
2020

2121
The checks in Cppcheck are not perfect. There are bugs that should be found, that Cppcheck fails to detect.

man/manual.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if it has non-standard syntax, as is common in for example embedded projects.
1616
Supported code and platforms:
1717

1818
- Cppcheck checks non-standard code that contains various compiler extensions, inline assembly code, etc.
19-
- Cppcheck should be compilable by any compiler that supports C++11 or later.
19+
- Cppcheck should be compilable by any compiler that supports C++17 or later.
2020
- Cppcheck is cross platform and is used in various posix/windows/etc environments.
2121

2222
The checks in Cppcheck are not perfect. There are bugs that should be found, that Cppcheck fails to detect.

philosophy.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ This is not just a tool for mainstream gcc/msvc c/c++ developers. If you can com
5151

5252
## C++ language
5353

54-
Our goal is to be highly portable. Users must be able to compile Cppcheck with GCC 4.8 or Visual Studio 2013.
55-
56-
No C++14 is allowed. A subset of C++11 is allowed.
57-
54+
Our goal is to be highly portable. Users must be able to compile Cppcheck with the default compiler of supported Debian/Ubuntu/Windows versions.
5855

5956
## Avoid dependencies
6057

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can stop the script whenever you like with Ctrl C.
3434
3535
## Compiling
3636
37-
Cppcheck requires a C++ compiler with (partial) C++11 support. Minimum required versions are GCC 5.1 / Clang 3.5 / Visual Studio 2015.
37+
Cppcheck requires a C++ compiler with C++17 support. Minimum required versions are GCC 7 / Clang 5 / Visual Studio 2017.
3838
3939
To build the GUI application, you need to use the CMake build system.
4040
@@ -197,7 +197,7 @@ make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXOPTS="-O2"
197197
If you just want to build Cppcheck without dependencies then you can use this command:
198198

199199
```shell
200-
g++ -o cppcheck -std=c++11 -Iexternals -Iexternals/simplecpp -Iexternals/tinyxml2 -Iexternals/picojson -Ilib -Ifrontend frontend/*.cpp cli/*.cpp lib/*.cpp externals/simplecpp/simplecpp.cpp externals/tinyxml2/tinyxml2.cpp
200+
g++ -o cppcheck -std=c++17 -Iexternals -Iexternals/simplecpp -Iexternals/tinyxml2 -Iexternals/picojson -Ilib -Ifrontend frontend/*.cpp cli/*.cpp lib/*.cpp externals/simplecpp/simplecpp.cpp externals/tinyxml2/tinyxml2.cpp
201201
```
202202

203203
#### Flags

0 commit comments

Comments
 (0)