> On Aug 30, 2022, at 9:22 AM, Jason Merrill via Gcc-patches 
> <gcc-patches@gcc.gnu.org> 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.
> 
> Jason

I'm not so sure.

In general, switches have a fixed meaning.  These do not.  "Current" has an 
intuitive meaning, but the actual meaning is "whatever what current when the 
version you happen to be invoking was released".  "Future" is like that only 
stranger.

If I create a software package that uses one of these switches in its Makefile, 
what will happen?  In a few years, perhaps sooner, the outcome will change 
without any changes to my code.  The answer would be "don't use those 
switches", and that is a good answer, but if so why add these switches?

        paul

Reply via email to