Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 5 months ago.
C++11
Hello
I'd like to ask why does mbed not default to C++11 or C++14 yet? Official ARM GCC builds (https://launchpad.net/gcc-arm-embedded) compile C++11 properly for a long time now. It also works fine with todays mbed so what's the wait about? Perhaps other proprietary compilers?
FunctionPointer & FunctionPointerArg1.. could be replaced by std::function. https://developer.mbed.org/cookbook/FPointer could be replaced & generalized by std::bind. (Btw. I'm not a proponent of std. Those variadic templates can be replaced by mbed's own implementation if needed.) People using smartpointers could utilize rvalue references. etc etc...
1 Answer
9 years, 5 months ago.
Oh I wish I could. C++1x !
The online compiler is running on ARMCC (not the latest version, so 5.x - version 6 will be clang based which has C++1x), therefore C++11 is not enabled there. Why do you think we came up with those FunctionPointer classes. As Ned shared, there is support but std::function for example is missing there :-) or some other cool stuff.
IAR for example yet does not support any C++1x but it's planned as I was told "fingers crossed".
By the way, we are are in 2015 :))
The online compiler doesn't use GCC. It looks as if the Keil compiler that is being used online does not yet have full support for C++11 (at least in their standard library).
posted by Ned Konz 18 Jun 2015