Fix PR#25973 : 'basic_string::assign(InputIt, InputIt) doesn't provide the strong exception safety guarantee'. This turned out to be a pervasive problem in <string>, which required a fair amount of rework. Add in an optimization for when iterators provide noexcept increment/comparison/assignment/dereference (which covers many of the iterators in libc++). Reviewed as http://reviews.llvm.org/D15862

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@257682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2016-01-13 21:54:34 +00:00
parent b27535c0c3
commit df9db31c27
43 changed files with 771 additions and 112 deletions

View File

@@ -51,7 +51,7 @@ int main()
test(S("12345678901234567890"), S("12345678901234567890"),
S("12345678901234567890"));
}
#if __cplusplus >= 201103L
#if TEST_STD_VER >= 11
{
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
test(S(), S(), S());