Page 1 of 1

C++ Version in v3.0.1?

Posted: Mon Jun 17, 2024 11:08 am
by gfvalvo
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

Re: C++ Version in v3.0.1?

Posted: Mon Jun 17, 2024 4:34 pm
by lbernstone
The compiler is gcc 12.2. No standard is called out in c-flags, so it should default to gnu17