On Tue, Aug 30, 2022 at 09:22:14AM -0400, Jason Merrill via Gcc-patches wrote:
> On 7/13/22 15:29, Nathan Sidwell wrote:
> > Inspired by a user question.  Jason, thoughts?
> > 
> > Since C++ is such a moving target, Microsoft have /std:c++latest
> > (AFAICT clang does not), to select the currently implemented version
> > of the working paper.  But the use of 'std:latest' is somewhat
> > ambiguous -- the current std is C++20 -- that's the latest std, the
> > next std will more than likely but not necessarily be C++23.  So this
> > adds:
> > 
> >    -std=c++current -- the current std (c++20)
> >    -std=c++future -- the working paper (c++2b)
> > 
> > also adds gnu++current and gnu++future to select the gnu-extended
> > variants.
> 
> I like this direction.
> 
> I imagine people using these to mean roughly beta and alpha, respectively.
> 
> Perhaps we also want -std=c++stable, which would currently be equivalent to
> the default (c++17) but might not always be.

I wonder how these new switches would be useful in older releases.  If
I use -std=c++current with gcc 5 years old, that's probably not very
useful?  Should there be a way to know what these options map to?

Also, I suppose that if we switch the default to gnu++20, then there may
be a window when -std=gnu++current == the default.

Marek

Reply via email to