Nytro Posted December 6, 2011 Report Posted December 6, 2011 [h=1]C++0x feature support in GCC 4.5[/h]Arpan Sen (arpansen@gmail.com), Independent author Summary: If you're one of the many users of the GCC C++ compiler, you should be aware of the new features that the upcoming C++0x specification has in store and available in GCC version 4.5.IntroductionThe GNU Compiler Collection (GCC) is the C++ compiler to the vast majority of us and has taken the lead in supporting features from the upcoming C++0x standard (see Resources for links to more information). This article focuses on a subset of several C++0x features that GCC version 4.5 supports, including static assertions, initializer lists, type narrowing, newer semantics of the auto keyword, lambda functions, and variadic templates. Some of these features—like static assertions—first made their appearance in GCC version 4.3, while lambda functions first appeared with the 4.5 release. If you intend to be one of the early adopters of C++0x, consider getting a copy of the draft standard and download GCC 4.5 (see Resources). Let's begin by briefly discussing parts of the C++0x standard that are not yet supported in GCCStatic assertionsRemember those times when your portable code crashed at a customer site,because integer sizes were not the 4 bytes you assumed them to be? Thestatic_assert construct in C++0x helps track precisely these kind of problems,except that they are available at compile time and immensely useful when you needto migrate sources to different platforms. Boost libraries (see Resources) have hadsupport for static assertions for some time now, but having static assertionsintegrated as part of the language core (static_assert is a C++0x keyword)implies that headers are no longer needed (see Listing 1)....................................Download:http://public.dhe.ibm.com/software/dw/aix/au-gcc-pdf.pdfOnline:http://www.ibm.com/developerworks/aix/library/au-gcc/index.html Quote