C++ Logo

std-proposals

Advanced search

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

From: Jan Schultke <janschultke_at_[hidden]>
Date: Sun, 18 May 2025 18:56:58 +0200
Switch statements are kind of obsoleted by pattern matching anyway,
which can do what you're suggesting here.

If we were to do this, it would probably make sense to allow class
types to be used in switch statements in general, rather than making
an exception just for the std::ordering types. However, with pattern
matching as a (better) alternative, the effort would be very difficult
to justify.

Received on 2025-05-18 16:57:11