this post was submitted on 12 Nov 2025
10 points (91.7% liked)
C++
2173 readers
1 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Annoying because they are methods, which means you can't backport them. Free functions are jst universally better. Then again, didn't really miss these two in particular very much because PCRE exists, and if you are already doing any significant text or math processing in your program, one regex is not much of an issue (the composable nature of text processing is such that adding the regex for starts/ends with is likely exact zero extra cost; some part of your system might already have been doing it before).
Okay, color me surprised here but I though we had gotten this one in C++20 or C++23 as part of the previously Experimentals? At least I seem to remembered an unordered something, but I can't recall if it was erase or not.
This is one of the big use cases why I still use
goto. Lead on with the important parts of the functions first, leave the specifics of why you can't/couldn't do it for later (goto), after (exceptions) or before (expected, result types, etc).