git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2010-11-17 21:11:40 +00:00
parent cd2254b454
commit 7b2cb48cc1
8 changed files with 39 additions and 39 deletions

View File

@@ -10,7 +10,7 @@
// <string>
// basic_string<charT,traits,Allocator>&
// replace(iterator i1, iterator i2, const charT* s);
// replace(const_iterator i1, const_iterator i2, const charT* s);
#include <stdio.h>
@@ -24,8 +24,8 @@ void
test(S s, S::size_type pos1, S::size_type n1, const S::value_type* str, S expected)
{
S::size_type old_size = s.size();
S::iterator first = s.begin() + pos1;
S::iterator last = s.begin() + pos1 + n1;
S::const_iterator first = s.begin() + pos1;
S::const_iterator last = s.begin() + pos1 + n1;
s.replace(first, last, str);
assert(s.__invariants());
assert(s == expected);