[libcxx-commits] [libcxx] [libc++][regex] Fix #51028 throw exception in the case of wrong range (PR #148231)

Lazarev Alexei via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 15 12:08:27 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])
----------------
insanustu wrote:

Done

https://github.com/llvm/llvm-project/pull/148231


More information about the libcxx-commits mailing list