What version of C++ does the latest Particle firmware (1.4.x) use/support? I know it at least supports c++11, but what about newer versions like 14? I’ve searched quite a bit looking for this answer, but it seems to not be documented anywhere.
I see , which lets you inspect the full compiler command line. Keep in mind they are using a specific GCC 5.3 embedded arm tool-chain.gnu++11
in the full build output
Edit: In device-os/build/lang-std.mk
I see CPPFLAGSS += std=gnu++14
and CONLYFLAGS += -std=gnu11
.
What that means is it’s basically C++11C++14, plus some gnu-specific extensions and perhaps some features from newer C++, and C11 plus gnu extensions for C source files
This is touching on this PR from back in April which was merged in May into v1.2.1
Referenced in the OS Updates Thread
Correct. It was previously C++11, but now it’s C++14 with Device OS 1.2.1 and later.
https://docs.particle.io/reference/device-os/firmware/#language-syntax
Also, gcc-arm compiler will be upgraded from 5.3.1 to 8.3.1 soon, as well. This will only be for targeting new versions of Device OS. Older versions will continue to use 5.3.1.
Do you plan to enable (or allow enabling) more recent C++ standards after the tool-chain update?
Good to know. Thank you.