Gnu C ++ 0x backward compatibility status - can I just turn it on and go?

I have a rather large base of C ++ code (not written independently). Numerous libraries, some not so syntactically heavy, some extremely. Among other things, the great use of Boost, some Eigen.

I just like some of the new 0x features, and a quick compiler / test tells me that this is all good. This question , and this one, suggests that there are some things that smell funny.

My current status:

  • gcc4.4.3
  • libstc ++ 6-4.4
  • boost 1.40
  • eigen 3.0 - beta3

using the flag std=c++0x.

I know that the standards committee suffered about backward compatibility and was in serious pain. My question is: did it work? Can I take all this code, enable C ++ 0x and be sure that everything not only compiles, but also works as expected?

I do not use magic with a high 0x, just autosome of the usual favorites are clearly marked as “implemented” in GNU C ++ 0x status .

+5
source share
3 answers

I would certainly recommend using GCC 4.5 as it has more bug fixes and a more robust implementation of the latest C ++ 0x.

Regarding questions related to you:

  • . , .

  • ++ 0x, ( , boost , /).

, , - , - . ( , GCC, MSVC ), . . , (GCC/MSVC/Intel/Clang) , ++ 0x , . ++ 0x , .

+3

, . , . , , .

, .

+2

. , 100% , , / :

If your code is not standard, if it uses functions specific to the compiler or version, if it has any instance of undefined behavior or depends on unspecified behavior that just works on your current platform, then if may not compile (if you lucky) or exhibit different behaviors at runtime (if you're out of luck).

+1
source

All Articles