C++17

sndsgd

Member
Hey folks, I'm working on a project and I'd like to use C++17/gnu++17 instead of 14. I'm able to get 17 working fine, but I'm wondering if there is a reason that it's not the default.
Code:
grep teensy41.build.flags.cpp ~/.arduino15/packages/teensy/hardware/avr/1.58.1/boards.txt
teensy41.build.flags.cpp=-std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing

To get it working I've just updated my makefile to use the same options, except I swapped out the -std to `-std=gnu++17`.
Code:
...
--build-property "build.flags.cpp=-std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing" \
...

Everything appears to be working fine, but I'm wondering if I'm somehow shooting myself in the foot.
 
C++17 is used in the 1.59 beta versions, latest is 1.59b5. I'm still on 1.59b3, but if you want to upgrade, go to 1.59.5. If you're using Arduino IDE 2, I believe it's listed as board package 0.59.5
 
Back
Top