Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/cpp/guide/code_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tools/run-docker.sh tools/fix_style.py .

The following general guidelines should be used for all code:

* C++17 is encouraged to allow developers to use C++17 features and the C++ STL:
* The library is C++20; new contributions and examples should target C++20. The C++ STL is welcome when it improves clarity:
Examples:

* [`std::function`](http://en.cppreference.com/w/cpp/utility/functional/function) and [lambda expressions](http://en.cppreference.com/w/cpp/language/lambda)
Expand Down
6 changes: 3 additions & 3 deletions docs/en/cpp/guide/toolchain.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building C++ Apps

The MAVSDK core C++ library is written in C++17 and exposes C++11 interfaces such as `std::function`. Therefore, applications using the library need to be C++11 or later as well.
The MAVSDK core C++ library is written in **C++20** (see `CMAKE_CXX_STANDARD` in `cpp/src/CMakeLists.txt`) and exposes C++11-friendly interfaces such as `std::function`. Applications using the library should be C++11 or later; shipped examples use C++20.

Applications can be built using your preferred build system, compiler and linker toolchain. The only requirement is that the build system must be able to locate the MAVSDK C++ headers and libraries (installed as described [here](installation.md)).

Expand Down Expand Up @@ -29,8 +29,8 @@ cmake_minimum_required(VERSION 3.15)
# Specify your project's name
project(your_project_name)

# Specify at least C++11, better C++17
set(CMAKE_CXX_STANDARD 17)
# Match the library/examples (C++20). C++17 may work for apps that only need older language surface.
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Enable strict handling of warnings
Expand Down
Loading