None of this worked on Linux to get C++17 to work with Platform.IO and ESP32
Eventually after lots of tinkering, the latest xtensa and v4.0 of arduino-espressif worked well…
** Note - you have to unflag
the useless gnu++11 and add propper c++17 support…
; un-flaging gnu++11 (it really sucks) and using proper C++17
build_unflags =-std=gnu++11
build_flags =-std=c++17
; need latest toolchains and frameworks to make C++17 work
platform_packages =
toolchain-xtensa32 @ 3.80200.200512
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.0