mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Merge pull request #6278 from IvanSavenko/cpp20
Migrate codebase to C++20
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Building VCMI for Linux
|
||||
|
||||
- Current baseline requirement for building is Ubuntu 20.04
|
||||
- Supported C++ compilers for UNIX-like systems are GCC 9+ and Clang 13+
|
||||
- Current baseline requirement for building is Ubuntu 22.04 or later
|
||||
- Supported C++ compilers for UNIX-like systems are GCC 10+ and Clang 13+
|
||||
|
||||
Older distributions and compilers might work, but they aren't tested by Github CI (Actions)
|
||||
|
||||
@@ -15,8 +15,8 @@ To compile, the following packages (and their development counterparts) are need
|
||||
- SDL2 with devel packages: mixer, image, ttf
|
||||
- minizip or minizip-ng
|
||||
- zlib and zlib-devel
|
||||
- Boost C++ libraries v1.48+: program-options, filesystem, system, thread, locale
|
||||
- Recommended, if you want to build launcher or map editor: Qt 5, widget and network modules
|
||||
- Boost C++ libraries: program-options, filesystem, system, thread, locale
|
||||
- Recommended, if you want to build launcher or map editor: Qt (widget and network modules)
|
||||
- Recommended, FFmpeg libraries, if you want to watch in-game videos: libavformat and libswscale. Their name could be libavformat-devel and libswscale-devel, or ffmpeg-libs-devel or similar names.
|
||||
- Optional:
|
||||
- if you want to build scripting modules: LuaJIT
|
||||
|
||||
@@ -2,9 +2,22 @@
|
||||
|
||||
## C++ Standard
|
||||
|
||||
VCMI implementation bases on C++17 standard. Any feature is acceptable as long as it's will pass build on our CI, but there is list below on what is already being used.
|
||||
VCMI implementation bases on C++20 standard. Any feature is acceptable as long as it's will pass build on our CI. At the time of writing, following compilers are supported, and any C++20 feature available across all these compilers can be used:
|
||||
|
||||
Any compiler supporting C++17 should work, but this has not been thoroughly tested. You can find information about extensions and compiler support at <http://en.cppreference.com/w/cpp/compiler_support>
|
||||
- GCC 10 or newer
|
||||
- Clang 13 or newer
|
||||
- Visual Studio 2022 (MSVC 19.44)
|
||||
- XCode 16.2 (Apple Clang 16.0.0)
|
||||
|
||||
You can find information about compiler support at <https://en.cppreference.com/w/cpp/compiler_support/20.html>.
|
||||
|
||||
Additionally, features that require macOS 10.15 or newer are not available: <https://developer.apple.com/xcode/cpp/#c++20>
|
||||
|
||||
- (C++17) Filesystem library
|
||||
- (C++17) Elementary string conversions std::to_chars, std::from_chars
|
||||
- (C++20) Synchronization library (<barrier>, <latch>, <semaphore> and notification functions on std::atomic)
|
||||
- (C++20) Add max() to latch and barrier
|
||||
- (C++20) memory_resource
|
||||
|
||||
## Style Guidelines
|
||||
|
||||
|
||||
Reference in New Issue
Block a user