Sep 22, 2012

A year after C++11

A spherical horse from MOBITECH
.. But - there's one proviso.
The model is only valid for a perfectly spherical horse
moving through a vacuum.

C++11 has been standardized on August 2011, more than one year ago. Though I'm not using it in everyday tasks (ARMCC for 3DS is said to have support for C++11 maybe in 2013), it's still interesting to know what's happening in a world of big programs and unrestricted resources.





Here's an overview table from Apache C++ Standard Library Wiki on the support of C++11 features in popular compilers. It shows that Clang is a leader, covering almost every aspect of the C++11. GCC is on a second place, closely following Clang.

MSVC and Intell C++ compilers are a bit far from full standard implementation, but also are pretty good.

Overall the situation appears to be much better than I expected. The only feature that is not implemented by all compilers is inheriting constructors. So if you are using one of these four compilers (or able to use Comeau), than C++11 is not a spherical horse in a vacuum for you.

Still, if you are thinking of writing some cross-compiler code, like a library, you have to think very carefully of what modern language features you are going to use. This matter seem to be asked often on Stackoverflow. See for example C++11 upgrade techniques, C++11 Feature Checking, How do I check for C++11 support?.

No comments:

Post a Comment

Post a Comment