I'm trying try get my Arduino code to compile with -std=c++14 instead of the default -std=gnu++11. To this end, I added to my platformio.ini:
build_flags = -std=c++14
build_unflags = -std=gnu++11
However, when I then try to compile, I get the following linker errors:
<artificial>:(.text+0x20a4): undefined reference to `operator delete(void*, unsigned int)'
(multiple times)
I seems that the delete operator is missing. I found some threads about adding it manually, which appears to be used to be necessary in the past with Arduino. However, this shouldn't be the case anymore, and with the default gnu++11 I do not have this issue. Why is this missing with c++14 (and later standards and their GNU extensions) and not with the default gnu++11?
I only have this problem with avr-gcc (for Arduino Uno), with arm-none-eabi-g++ (for Teensy), this problem does not occur.