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

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.