diff --git a/libcxx/include/__tree b/libcxx/include/__tree index c627641d5d86f..c07de5c95b0dc 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -1432,8 +1432,9 @@ void __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _ __cache.__advance(); } } + const_iterator __e = end(); for (; __first != __last; ++__first) - __insert_multi(_NodeTypes::__get_value(*__first)); + __insert_multi(__e, _NodeTypes::__get_value(*__first)); } template