Hi there,
I maintain a full stack of Arduino libraries called (H4) that include H4AsyncTCP, H4AsyncMQTT, H4AsyncHTTP, H4AsyncWebserver, and H4Plugins.
I'm interested to know when will be an upgrade to the default compile C++ standard, as the current is (C++11), so to feel free using features of newer versions.
Thanks.
C++ default standard compilation
Re: C++ default standard compilation
ESP-IDF uses C++20 (with GCC 11.2) in v5.0.x and C++23 (with GCC 12.1) in v5.1.
The next minor release, v5.2 is expected to use C++23 with GCC 13.1.
Given that your question is related to Arduino-esp32, I think the relevant milestone is v3.0.0 release, which is going to use IDF v5.1.x and therefore C++23.
The next minor release, v5.2 is expected to use C++23 with GCC 13.1.
Given that your question is related to Arduino-esp32, I think the relevant milestone is v3.0.0 release, which is going to use IDF v5.1.x and therefore C++23.
-
- Posts: 11
- Joined: Tue Dec 27, 2022 6:02 pm
Re: C++ default standard compilation
Thanks for the reply.ESP_igrr wrote: ↑Mon Jul 31, 2023 9:41 pmESP-IDF uses C++20 (with GCC 11.2) in v5.0.x and C++23 (with GCC 12.1) in v5.1.
The next minor release, v5.2 is expected to use C++23 with GCC 13.1.
Given that your question is related to Arduino-esp32, I think the relevant milestone is v3.0.0 release, which is going to use IDF v5.1.x and therefore C++23.
I see this, but I'm wondering why I see the compiler definition points to C++11 unless I explicitly switch it? I'm using PlatformIO.
Code: Select all
#define _CRT_STRINGIZE_(x) #x
#define _CRT_STRINGIZE(x) _CRT_STRINGIZE_(x)
#pragma message ("CPlusPlus " _CRT_STRINGIZE(__cplusplus))
Note I'm using v2.11, which is based on ESP-IDF v4.4.5.
Is it a PlatformIO issue or arduino-esp32 related?
Regards,
Hamza
Re: C++ default standard compilation
Seems correct, all releases <=v4.x have used -std=gnu++11. So to summarize,Hamzah Hajeir wrote: Note I'm using v2.11, which is based on ESP-IDF v4.4.5.
- IDF v4.4.x and lower — C++11
- IDF v5.0.x — C++20
- IDF v5.1.x — C++23
- (future) IDF v5.2.x — C++23 (expected)
-
- Posts: 11
- Joined: Tue Dec 27, 2022 6:02 pm
Re: C++ default standard compilation
Thank you, this makes full of sense.ESP_igrr wrote:Seems correct, all releases <=v4.x have used -std=gnu++11. So to summarize,Hamzah Hajeir wrote: Note I'm using v2.11, which is based on ESP-IDF v4.4.5.
- IDF v4.4.x and lower — C++11
- IDF v5.0.x — C++20
- IDF v5.1.x — C++23
- (future) IDF v5.2.x — C++23 (expected)
Who is online
Users browsing this forum: No registered users and 74 guests