Fix <rdar://problem/10255403> match_results::begin() is off by one
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141494 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,8 +27,8 @@ test()
|
||||
std::match_results<const char*>::const_iterator i = m.begin();
|
||||
std::match_results<const char*>::const_iterator e = m.end();
|
||||
|
||||
assert(e - i == m.size() - 1);
|
||||
for (int j = 1; i != e; ++i, ++j)
|
||||
assert(e - i == m.size());
|
||||
for (int j = 0; i != e; ++i, ++j)
|
||||
assert(*i == m[j]);
|
||||
}
|
||||
|
||||
|
@@ -27,8 +27,8 @@ test()
|
||||
std::match_results<const char*>::const_iterator i = m.cbegin();
|
||||
std::match_results<const char*>::const_iterator e = m.cend();
|
||||
|
||||
assert(e - i == m.size() - 1);
|
||||
for (int j = 1; i != e; ++i, ++j)
|
||||
assert(e - i == m.size());
|
||||
for (int j = 0; i != e; ++i, ++j)
|
||||
assert(*i == m[j]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user