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:
@@ -1687,25 +1687,6 @@ search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const
|
||||
}
|
||||
|
||||
// copy
|
||||
|
||||
template <class _Iter>
|
||||
struct __libcpp_is_trivial_iterator
|
||||
{
|
||||
static const bool value = is_pointer<_Iter>::value;
|
||||
};
|
||||
|
||||
template <class _Iter>
|
||||
struct __libcpp_is_trivial_iterator<move_iterator<_Iter> >
|
||||
{
|
||||
static const bool value = is_pointer<_Iter>::value;
|
||||
};
|
||||
|
||||
template <class _Iter>
|
||||
struct __libcpp_is_trivial_iterator<__wrap_iter<_Iter> >
|
||||
{
|
||||
static const bool value = is_pointer<_Iter>::value;
|
||||
};
|
||||
|
||||
template <class _Iter>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Iter
|
||||
|
||||
Reference in New Issue
Block a user