Skip to content

Commit 1e40742

Browse files
committed
[libc++][C++03] Cherry-pick #148231
1 parent 6712e20 commit 1e40742

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

libcxx/include/__cxx03/regex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,7 @@ public:
21002100
__ranges_.push_back(
21012101
std::make_pair(__traits_.transform(__b.begin(), __b.end()), __traits_.transform(__e.begin(), __e.end())));
21022102
} else {
2103-
if (__b.size() != 1 || __e.size() != 1)
2103+
if (__b.size() != 1 || __e.size() != 1 || char_traits<typename string_type::value_type>::lt(__e[0], __b[0]))
21042104
__throw_regex_error<regex_constants::error_range>();
21052105
if (__icase_) {
21062106
__b[0] = __traits_.translate_nocase(__b[0]);

libcxx/test/std/re/re.regex/re.regex.construct/bad_range.pass.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// template <class ST, class SA>
1515
// basic_regex(const basic_string<charT, ST, SA>& s);
1616

17-
// XFAIL: FROZEN-CXX03-HEADERS-FIXME
18-
1917
#include <regex>
2018
#include <cassert>
2119
#include "test_macros.h"

0 commit comments

Comments
 (0)