Spaceships

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Spaceships

Hans Wennborg via cfe-dev

Hi CFE-Devs,

 

I notice in the v6.0 branch that there is a new token called “spaceship” that is for the character sequence ‘<=>’.  What is this used for?

 

Thanks,

 

            MartinO

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Spaceships

Hans Wennborg via cfe-dev
On Sun, Feb 18, 2018 at 12:55 AM, Martin J. O'Riordan via cfe-dev
<[hidden email]> wrote:
> Hi CFE-Devs,
>
>
>
> I notice in the v6.0 branch that there is a new token called “spaceship”
> that is for the character sequence ‘<=>’.  What is this used for?
See C++2a "spaceship operator"

> Thanks,
>
>
>
>             MartinO
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Spaceships

Hans Wennborg via cfe-dev
In reply to this post by Hans Wennborg via cfe-dev
Hi Martin,

I guess, it is reserved for the upcoming three-way comparison ("spaceship") operator: http://en.cppreference.com/w/cpp/language/operator_comparison


18.02.2018 00:55, Martin J. O'Riordan via cfe-dev пишет:

Hi CFE-Devs,

 

I notice in the v6.0 branch that there is a new token called “spaceship” that is for the character sequence ‘<=>’.  What is this used for?

 

Thanks,

 

            MartinO

 



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Spaceships

Hans Wennborg via cfe-dev
In reply to this post by Hans Wennborg via cfe-dev
This is the C++20 three-way comparison operator. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0515r3.pdf

On 17 Feb 2018 13:55, "Martin J. O'Riordan via cfe-dev" <[hidden email]> wrote:

Hi CFE-Devs,

 

I notice in the v6.0 branch that there is a new token called “spaceship” that is for the character sequence ‘<=>’.  What is this used for?

 

Thanks,

 

            MartinO

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Spaceships

Hans Wennborg via cfe-dev

Thanks Richard and Alexey,

 

your references explain this perfectly.  I had been completely oblivious to this extension proposal - neat name for the token J

 

All the best,

 

            MartinO

 

From: Richard Smith [mailto:[hidden email]]
Sent: 17 February 2018 22:02
To: Martin J. O'Riordan <[hidden email]>
Cc: Clang Dev <[hidden email]>
Subject: Re: [cfe-dev] Spaceships

 

This is the C++20 three-way comparison operator. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0515r3.pdf

 

On 17 Feb 2018 13:55, "Martin J. O'Riordan via cfe-dev" <[hidden email]> wrote:

Hi CFE-Devs,

 

I notice in the v6.0 branch that there is a new token called “spaceship” that is for the character sequence ‘<=>’.  What is this used for?

 

Thanks,

 

            MartinO

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev