[libcxx-commits] [libcxx] [libc++][regex] Fix #51028 throw exception in the case of wrong range (PR #148231)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 15 10:11:40 PDT 2025
================
@@ -2120,7 +2120,7 @@ public:
__ranges_.push_back(
std::make_pair(__traits_.transform(__b.begin(), __b.end()), __traits_.transform(__e.begin(), __e.end())));
} else {
- if (__b.size() != 1 || __e.size() != 1)
+ if (__b.size() != 1 || __e.size() != 1 || __b[0] > __e[0])
----------------
ldionne wrote:
Should we be using `char_traits::lt` to perform this comparison though?
https://github.com/llvm/llvm-project/pull/148231
More information about the libcxx-commits
mailing list