diff --git a/components/esp_common/include/esp_macros.h b/components/esp_common/include/esp_macros.h index 753f095ddb..9a1c834588 100644 --- a/components/esp_common/include/esp_macros.h +++ b/components/esp_common/include/esp_macros.h @@ -32,7 +32,7 @@ extern "C" { * - MACRO_ARGS(__VA_ARGS__) if __VA_ARGS__ was not empty * - MACRO_NO_ARGS() if __VA_ARGS__ was empty * - * @note In the future, we want to switch to C++20. We also want to become compatible with clang. Hence, we provide two + * @note In the future, we want to become compatible with clang. Hence, we provide two * versions of the following macros which are using variadic arguments. One is using the GNU extension ##__VA_ARGS__. * The other is using the C++20 feature __VA_OPT__(,). This allows users to compile their code with standard C++20 * enabled instead of the GNU extension. Below C++20, we haven't found any good alternative to using ##__VA_ARGS__. diff --git a/components/log/include/esp_log.h b/components/log/include/esp_log.h index e5cf473dda..51ff0a0655 100644 --- a/components/log/include/esp_log.h +++ b/components/log/include/esp_log.h @@ -288,7 +288,7 @@ void esp_log_writev(esp_log_level_t level, const char* tag, const char* format, /// Log at ``ESP_LOG_ERROR`` level. @see ``printf``,``ESP_LOGE``,``ESP_DRAM_LOGE`` /** - * In the future, we want to switch to C++20. We also want to become compatible with clang. + * In the future, we want to become compatible with clang. * Hence, we provide two versions of the following macros which are using variadic arguments. * The first one is using the GNU extension \#\#__VA_ARGS__. The second one is using the C++20 feature __VA_OPT__(,). * This allows users to compile their code with standard C++20 enabled instead of the GNU extension. diff --git a/docs/en/api-guides/cplusplus.rst b/docs/en/api-guides/cplusplus.rst index 9756c48c99..c188c467b1 100644 --- a/docs/en/api-guides/cplusplus.rst +++ b/docs/en/api-guides/cplusplus.rst @@ -23,14 +23,14 @@ esp-idf-cxx Component C++ language standard --------------------- -By default, ESP-IDF compiles C++ code with C++20 language standard with GNU extensions (``-std=gnu++20``). +By default, ESP-IDF compiles C++ code with C++23 language standard with GNU extensions (``-std=gnu++23``). To compile the source code of a certain component using a different language standard, set the desired compiler flag in the component CMakeLists.txt file: .. code-block:: cmake idf_component_register( ... ) - target_compile_options(${COMPONENT_LIB} PRIVATE -std=gnu++2b) + target_compile_options(${COMPONENT_LIB} PRIVATE -std=gnu++11) Use ``PUBLIC`` instead of ``PRIVATE`` if the public header files of the component also need to be compiled with the same language standard.