C++ Logo


Advanced search

Re: nullptr_t and nullopt_t should both have operator<=> and operator== to enable the *_with concepts

From: Nevin Liber <nevin_at_[hidden]>
Date: Fri, 9 Jul 2021 14:38:15 -0500
On Fri, Jul 9, 2021 at 2:04 PM Ville Voutilainen <
ville.voutilainen_at_[hidden]> wrote:

> On Fri, 9 Jul 2021 at 21:51, Nevin Liber via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> > That same argument applies to comparing two nullptr_t objects, and yet
> we can equality compare them.
> Alright. So nullptr_it has equality, but no ordering, and this
> proposal gives it ordering. It's a funny ordering tho,
> since the ordering just tells us that all nullptr_t objects are equal.

You and I just have two different definitions of funny. :-). I find it
funny that we can order compare them with raw pointers, shared_ptrs and
unique_ptrs, but not order compare it with itself.
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden] <nevin_at_[hidden]>>

Received on 2021-07-09 14:38:54