rsmith added a comment.

Looks good to me, but I'd like EricWF to also review.



================
Comment at: include/deque:1167-1168
     allocator_type& __a = __alloc();
-    for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
-        __alloc_traits::destroy(__a, _VSTD::addressof(*__i));
+    for (iterator __i = begin(), __e = end(); __i.__ptr_ != __e.__ptr_; 
__i.operator++())
+        __alloc_traits::destroy(__a, _VSTD::addressof(__i.operator*()));
     size() = 0;
----------------
The other changes all look like obvious improvements to me. This one is a 
little more subtle, but if we want types like `deque<Holder<Incomplete> *>` to 
be destructible, I think we need to do something equivalent to this.


https://reviews.llvm.org/D37538



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to