C++ Version in v3.0.1?

gfvalvo
Posts: 35
Joined: Thu Dec 24, 2020 3:06 pm

C++ Version in v3.0.1?

Postby gfvalvo » Mon Jun 17, 2024 11:08 am

What is the C++ standard used by default in ESP32 Arduino Core v3.0.1? The below code indicates that it's C++ something like "C++21" which I didn't even know was an official version?

Code: Select all

void setup() {
  Serial.begin(115200);
  delay(2000);

  auto ver = __cplusplus;
  Serial.print("C++ Version: ");
  Serial.println(ver);
}

void loop() {
}
Result:

Code: Select all

C++ Version: 202100

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

Re: C++ Version in v3.0.1?

Postby lbernstone » Mon Jun 17, 2024 4:34 pm

The compiler is gcc 12.2. No standard is called out in c-flags, so it should default to gnu17

Who is online

Users browsing this forum: Google [Bot] and 86 guests