Re: How 'experimental' is -std=c++0x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 November 2011 21:10, Syncopated wrote:
>
> -std=c++0x support in gcc is said to be 'experimental'. Even a macro used to
> detect c++0x is __GXX_EXPERIMENTAL_CXX0X__.
>
> How experimental is 'experimental'? Does it mean that gcc has not much test
> coverage with -std=c++0x compared to without? Does it mean there's a much
> high chance of getting incorrect generated code even with source code that's
> c++98?

No, neither of those things.  The entire testsuite is run in C++11
mode, plus additional tests that only work for C++11.

There is not as much guarantee that everything works (for example some
uses of lambda functions don't work or even crash the compiler), or
that all features are complete (parts of the standard library are
missing or incorrect), and more importantly there is not a guarantee
that things will not change in future in incompatibly ways.

If you compile code today with -std=c++11 it might not link with code
compiled with -std=c++98, and might not link with code compiled with
-std=c++11 by a future release of GCC.

There's no way to answer "how experimental is it?" because there's no
way to put a number on it.  I would not use an experimental feature
for production code or mission critical systems, unless you are
willing to accept that you might encounter problems or have to
recompile everything at some point in the future.  If something
doesn't work we'll definitely try to fix it, but don't complain you
weren't warned!


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux