mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 18:10:57 +02:00
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:
@@ -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:
|
||||
|
||||
|
@@ -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 文件中设置所需的编译器标志:
|
||||
|
||||
|
Reference in New Issue
Block a user