Pradhan
Pradhan

Reputation: 16737

C++14 support in GCC is experimental

Quoting from the GCC page on C++14 support

Important: Because the final ISO C++14 standard was only recently published, GCC's support is experimental. No attempt will be made to maintain backward compatibility with implementations of C++14 features that do not reflect the final standard.

I could not find the official GCC definition of experimental. Does it only apply to backward compatibility wrt non-standard features, as the last sentence mentions? Or does it also indicate stability, or lack thereof? An earlier sentence on the same page says

C++14 features are available as part of the "mainline" GCC compiler in the trunk of GCC's Subversion repository and in GCC 4.8 and later.

To me, this suggests stability. Is this the case? In particular, my question is about GCC 4.9, since that is the earliest version with full C++14 support, according to the aforementioned page.

Upvotes: 2

Views: 4185

Answers (1)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385194

There is no "official GCC definition", only the official English definition.

The passage means that, where GCC previously implemented experimental prototypes of then-upcoming C++14 features before C++14 was published, future versions will not bother to try to maintain backward compatibility with those experiments.

Backward compatibility between two versions is only maintained with respect to features that were in an International Standard at the time that they were included in those versions.

This is because, prior to standard publication, the specification of new C++ features can change rather dramatically. It would be madness to guarantee that early experiments in support for them would be forwards compatible with the final, true feature as eventually published in a standard.

In short: use experimental features at your own risk and do not expect them to work the same way in the next version of GCC.

Upvotes: 9

Related Questions