C++ Logo

std-proposals

Advanced search

[std-proposals] D4040R0 Case ranges

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 27 Feb 2026 12:16:59 +0100
Hi,

https://isocpp.org/files/papers/D4040R0.html

I am proposing to add case ranges to C++. For example, this lets you write:

switch (next_char) {
  case '0' ... '9': // ...
}

Find all the details at the link. Happy to hear any thoughts on the matter.


Jan

Received on 2026-02-27 11:17:16