https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81147
--- Comment #3 from Felipe Magno de Almeida <felipe at expertisesolutions dot com.br> --- It actually compiles for me because I have enabled libstdc++v3 for avr target. But I'm attaching a new one without the unnecessary includes. Line command to compile: avr-g++ -std=c++14 -fno-exceptions -fno-rtti -Wno-unused-local-typedefs -fno-use-cxa-atexit -save-temps -fverbose-asm -dap -fdump-tree-all-all -Wall -mmcu=atmega2560 -fno-strict-aliasing -DAUTO_CRC_PADDING=2 -Os -ffunction-sections -fdata-sections -MMD -c test.cpp -o test.o Regards,