C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow switch for std::meow_ordering

From: Gabriel Ravier <gabravier_at_[hidden]>
Date: Tue, 20 May 2025 13:18:35 +0200
On 5/18/25 1:41 PM, Tymi via Std-Proposals wrote:
> `switch (left <=> right)` would be a nice thing to have not only for
> stylistic reasons, but could also be an easy way for the compiler to
> form a jump table, and be less bug prone than a chain of if/else
>
> It would require a small core language change, mainly explicitly
> allowing std::meow_ordering in switch expressions, I said small
> because meow_ordering has an exposition only non static data member
> integral value for the comparison. Not sure about the wording though,
> that might be the difficult part
>
> Tymi.
>
Did I miss something (and seemingly the entire internet, since Google
returns no results for "meow_ordering") or is "meow_ordering" not a
thing/referring to something else ?

Received on 2025-05-20 11:18:39