Three-way comparison operator

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

Three-way comparison operator

Boost - Users mailing list
Hi Boosters,
 
Does anyone know if Boost.Test has been updated to provide support for the three-way comparison operator?
 
I’m asking because I’ve encountered a situation where my user-defined class provides the three-way comparison operator but when I perform comparisons using Boost.Test it complains that my class has no ‘operator==’ which is true because it provides ‘operator<=>’.
 
Please note that I’m using Boost 1.73.0 and g++ 10.0.1.
 
Is there any plan to add the three-way comparison operator support?
 
Kind regards,
Leo
 

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Three-way comparison operator

Boost - Users mailing list
On Thu, 30 Apr 2020 at 07:18, Leo Carreon via Boost-users
<[hidden email]> wrote:
>
> Hi Boosters,
>
> Does anyone know if Boost.Test has been updated to provide support for the three-way comparison operator?

https://www.boost.org/community/policy.html says
"A tag on the subject line will help ensure the right people see your post."

FYI, busy maintainers may ignore all posts but the tagged ones.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Three-way comparison operator

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
On Thu, 30 Apr 2020 at 07:18, Leo Carreon via Boost-users
<[hidden email]> wrote:
>
> Does anyone know if Boost.Test has been updated to provide support for the three-way comparison operator?
>
> Is there any plan to add the three-way comparison operator support?

If there is no answer, you may consider opening an issue at
https://github.com/boostorg/test

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Three-way comparison operator

Boost - Users mailing list
Scanning the change log it doesn't seem likely boost.test was updated.  Also given that the feature really just arrived in clang 10 in the last month and gcc 10 isn't yet released almost no one has reacted to operator<=> yet.  All that said, most stuff like boost.test that uses operators shouldn't need to be modified.  A deeper possibility here is boost.test is fine and that Leo might need to implement operator== with the operator<=>.  Have a look thru this blog post https://brevzin.github.io/c++/2019/07/28/comparisons-cpp20/


Jeff

On Thu, Apr 30, 2020 at 1:39 AM Mateusz Loskot via Boost-users <[hidden email]> wrote:
On Thu, 30 Apr 2020 at 07:18, Leo Carreon via Boost-users
<[hidden email]> wrote:
>
> Does anyone know if Boost.Test has been updated to provide support for the three-way comparison operator?
>
> Is there any plan to add the three-way comparison operator support?

If there is no answer, you may consider opening an issue at
https://github.com/boostorg/test

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Three-way comparison operator

Boost - Users mailing list
On Thu, 30 Apr 2020 at 13:17, Jeff Garland via Boost-users
<[hidden email]> wrote:
>
> Scanning the change log it doesn't seem likely boost.test was updated.  Also given that the feature really just arrived in clang 10 in the last month and gcc 10 isn't yet released almost no one has reacted to operator<=> yet.  All that said, most stuff like boost.test that uses operators shouldn't need to be modified.  A deeper possibility here is boost.test is fine and that Leo might need to implement operator== with the operator<=>.  Have a look thru this blog post https://brevzin.github.io/c++/2019/07/28/comparisons-cpp20/

One of the changes of C++20, coming with operator<=>, is rewritten
candidates for comparison operator overload resolution, which has been
causing massive breakage among any significant C++ codebase. Many
people have already been submitting patches for these for the last six
months in various software packages, Boost included.
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users