Merge branch 'docs/improve_descr_on_language_standard' into 'master'

docs: Update description on C++ language standard

See merge request espressif/esp-idf!41426
This commit is contained in:
Ren Peiying
2025-08-25 18:53:35 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ The following C++ features are supported:
C++ Language Standard
---------------------
By default, ESP-IDF compiles C++ code with C++26 language standard with GNU extensions (``-std=gnu++26``).
By default, ESP-IDF compiles C++ code using C++26 language standard with GNU extensions (``-std=gnu++26``) for chip targets. For Linux targets, ESP-IDF selects the highest C+ standard supported by your host compiler. To use the highest C++ standard, upgrade your Linux toolchain to a version that supports it.
To compile the source code of a certain component using a different language standard, set the desired compiler flag in the component's ``CMakeLists.txt`` file:

View File

@@ -26,7 +26,7 @@ ESP-IDF 支持以下 C++ 功能:
C++ 语言标准
---------------------
默认情况下ESP-IDF 使用 C++26 语言标准和 GNU 扩展 (``-std=gnu++26``) 编译 C++ 代码。
对于芯片目标ESP-IDF 默认使用带有 GNU 扩展的 C++26 语言标准 (``-std=gnu++26``) 编译 C++ 代码。对于 Linux 目标ESP-IDF 会选择你的编译器支持的最高 C++ 标准。此时如需使用最新的 C++ 语言标准,请将 Linux 工具链升级到支持该标准的版本。
要使用其他语言标准编译特定组件的源代码,请按以下步骤,在组件的 CMakeLists.txt 文件中设置所需的编译器标志: