Implementing p0515 - spaceship operator

Tim van Deurzen tim@kompiler.org
Wed Jan 10 21:24:00 GMT 2018


On 01/10/2018 02:00 PM, Jonathan Wakely wrote:

> On 9 Jan 2018 10:56 p.m., "Tim van Deurzen" wrote:
>
>
>     Just to confirm with you, it does make sense to conditionally
>     parse the token for operator<=> in libcpp (i.e. only when the cxx
>     standard being used is >=2a)? I'm just wondering if this does not
>     accidentally affect other front-ends using libcpp?
>
>
> Other front ends won't setthe language to C++2a.
>
> I think the relevant check is:
>
>       if (CPP_OPTION (pfile, lang) == CLK_CXX2A
>           || CPP_OPTION (pfile, lang) == CLK_GNUCXX2A)
>
> This can only be true for a C++ source file when the standard is C++2a.
>
Ok, good to know, then I'll proceed like this. Thank you!

Tim.



More information about the Gcc mailing list