Merge branch 'feature/upgrade_c_cxx_standards' into 'master'

build system: use C17 and C++2a by default

Closes IDF-1499, IDFGH-1788, IDFGH-2781, and IDFGH-7617

See merge request espressif/esp-idf!18371
This commit is contained in:
Jakob Hasse
2022-06-20 12:24:08 +08:00
23 changed files with 281 additions and 161 deletions

View File

@@ -4,8 +4,6 @@ idf_component_register(SRCS "esp_mqtt_cxx.cpp"
INCLUDE_DIRS "include"
)
target_compile_options(${COMPONENT_LIB} PRIVATE "-std=gnu++17")
if(TEST_BUILD)
message(STATUS "Test build")
idf_component_get_property(mqtt_dir mqtt COMPONENT_DIR)

View File

@@ -1,4 +1,2 @@
idf_component_register(SRCS "mqtt_ssl_example.cpp"
INCLUDE_DIRS ".")
target_compile_options(${COMPONENT_LIB} PRIVATE "-std=gnu++17")

View File

@@ -1,3 +1,2 @@
idf_component_register(SRCS "mqtt_tcp_example.cpp"
INCLUDE_DIRS ".")
target_compile_options(${COMPONENT_LIB} PRIVATE "-std=gnu++17")

View File

@@ -18,8 +18,8 @@
class chat_message
{
public:
enum { header_length = 4 };
enum { max_body_length = 512 };
static constexpr std::size_t header_length = 4;
static constexpr std::size_t max_body_length = 512;
chat_message()
: body_length_(0)