GCC Developers Discuss Possible -std=c++current & -std=c++future Options

Written by Michael Larabel in GNU on 1 September 2022 at 05:34 AM EDT. 16 Comments
GNU
Inspired by Microsoft's compiler toolchain having a "std:c++latest" option for automatically targeting the latest supported C++ spec, GCC compiler developers have been discussing the possibility of a similar feature with the ability to specify -std=c++current for the current C++ standard or -std=c++future for the future/draft specification.

The idea is to have GCC support "-std=c++current" that would be a moving target to the current C++ specification supported by the compiler while "-std=c++future" would be for targeting the current work-in-progress/draft C++ specification in current working form. There would also be similar gnu++current / gnu++future options for the GNU C++ extended variants.


While the idea is nice, in practice some concerns have already been raised over this being a constant moving target and may lead to user confusion. In particular, with developers/users often running a compiler that can be a year or several years old, the "current" and "future" targets will mean different C++ versions and not necessarily what is actually the current/future target at the time of use. Especially on enterprise Linux distributions where users out-of-the-box can be running a several year old compiler, interpreting the meaning of current/future will not necessarily be accurate with what the user is expecting.

For now the proposed GCC options are being discussed in this gcc-patches mailing list thread for those interested in the prospects of -std=c++current and -std=c++future.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week