[libcxx-commits] [libcxx] 3d7c632 - [libc++][C++03] Cherry-pick #148231 (#163360)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 14 04:00:50 PDT 2025
Author: Nikolas Klauser
Date: 2025-10-14T13:00:45+02:00
New Revision: 3d7c632bfbb9a98a1302f6f0f95bde4c2d4d4e8f
URL: https://github.com/llvm/llvm-project/commit/3d7c632bfbb9a98a1302f6f0f95bde4c2d4d4e8f
DIFF: https://github.com/llvm/llvm-project/commit/3d7c632bfbb9a98a1302f6f0f95bde4c2d4d4e8f.diff
LOG: [libc++][C++03] Cherry-pick #148231 (#163360)
Added:
Modified:
libcxx/include/__cxx03/regex
libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/include/__cxx03/regex b/libcxx/include/__cxx03/regex
index f4e662d283cb9..b6a78f27fbd37 100644
--- a/libcxx/include/__cxx03/regex
+++ b/libcxx/include/__cxx03/regex
@@ -2100,7 +2100,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 || char_traits<typename string_type::value_type>::lt(__e[0], __b[0]))
__throw_regex_error<regex_constants::error_range>();
if (__icase_) {
__b[0] = __traits_.translate_nocase(__b[0]);
diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp
index ecfdaee2eed66..cabd9ebec520e 100644
--- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp
+++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp
@@ -14,8 +14,6 @@
// template <class ST, class SA>
// basic_regex(const basic_string<charT, ST, SA>& s);
-// XFAIL: FROZEN-CXX03-HEADERS-FIXME
-
#include <regex>
#include <cassert>
#include "test_macros.h"
More information about the libcxx-commits
mailing list