Use c++17 or newer by default for framework = arduino

Hi,

I’ve created some platform io libs:

Some features from c++14 and 17 are used in order to create simpler and memory/performance optimized code.
Currently by default is used c++11 by default. Each time when used my libs, something like:
build_flags =
-std=c++17
-std=gnu++17
build_unflags =
-std=gnu++11
should be added.

For first look arduino framework has -std=c++11 by default.
As I understand, because avr-gcc supports lower version.
Tried on gcc 5.4.0: ~$ avr-gcc -std=c++17
and it passed.

Perhaps it can be a good time to increase c++ standard for arduino.
Or something is missed by me?

100% agreed.

Please file an issue in the AVR Arduino core to get the -std=gnu++11

setting fixed upstream. PlatformIO aims to by-default compile with the same settings as the underlying Arduino core so that users can expect the same results.

Edit: Oh of course it has been filed before at

and it’s been that open for over a year.

Unfortunately,
The reasons, why not to do it, do not appeal to me in opened github issue :frowning: