mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
esp_common: add handling for designated inits for C++20
This commit is contained in:
parent
9dba0476a0
commit
9ff37d122a
@ -40,7 +40,10 @@
|
||||
* ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(arr, "Value")
|
||||
* };
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus) && __cplusplus >= 202002L
|
||||
#define ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(member, value) .member = value,
|
||||
#define ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(member) .member = { },
|
||||
#elif defined(__cplusplus) && __cplusplus < 202002L
|
||||
#define ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_STR(member, value) { .member = value },
|
||||
#define ESP_COMPILER_DESIGNATED_INIT_AGGREGATE_TYPE_EMPTY(member) .member = { },
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user