<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class=""></blockquote><blockquote type="cite" class=""><blockquote type="cite" class="">Hello everyone, I hope this mailing list is the right place to ask about<br class="">this. When I try to compile this particular code<br class="">sample <a href="https://godbolt.org/g/J7cgbV" class="">https://godbolt.org/g/J7cgbV</a> I get an error, that A must have a<br class="">copy assignment operator. However when reading the documentation<br class="">at <a href="https://en.cppreference.com/w/cpp/container/vector/insert" class="">https://en.cppreference.com/w/cpp/container/vector/insert</a> I do not<br class="">see any such requirements for this particular overload of insert. It<br class="">does mention that T must be moveAssignable and MoveInsertable if<br class="">Iterator is not ForwardIterator. Even if I define move assignment<br class="">operator it still requires copy assignment.<br class=""><br class="">I have tested it on Clang 4, Clang 6, GCC 8.1 and get the same error.<br class="">MSVC 2017 compiles when move assignment is present. It would be great if<br class="">someone could explain this behavior.<br class=""></blockquote><br class="">hi,<br class="">please look at:<br class=""><a href="https://en.cppreference.com/w/cpp/iterator/make_move_iterator" class="">https://en.cppreference.com/w/cpp/iterator/make_move_iterator</a></blockquote><br class=""><div class="">I am afraid this is not what I am trying to achieve. I want to copy vector contents via insert, but why it requires copy assignment to be defined in order to compile? Simple construction from the pair of iterators works without it.</div></body></html>