Does gcc 4.8.1 have C++11 support for garbage coll

2019-04-05 07:52发布

问题:

The reason I'm asking is, that there are contradictory pieces of information on the web. On the one hand on isocpp.org it states that GCC 4.8.1 has the C++11 standard implemented completely. On the other hand the GCC C++11 support page states that there is no "Minimal support for garbage collection and reachability-based leak detection". So is GCC 4.8.1 really C++11 feature complete?

回答1:

The support for garbage collection is optional by the standard (see Bjarne Stroustrup C++11 FAQ). Therefore, GCC 4.8.1 is feature complete since it implements all the mandatory core parts of the standard.

The comments proved my answer unclear, I will be more specific: I was only talking about the core support for garbage collection. The library part is mandatory. The version of libstdc++ shipped with GCC 4.8.1 is not fully C++11-compliant (<regex> is not currently working for example), and the ABI for garbage collection is part of the missing features.