<div dir="ltr">btw, in each case, the derived class's move ctor was called.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 5:36 PM, don hinton <span dir="ltr"><<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I just did some tests, and when a derived class is explicitly moved, e.g., with std::move(), the current behavior is (clang++/g++/vc++):<div><br></div><div>1) if base has implicit move, it gets called</div><div>2) if base doesn't have an implicit move (because a copy ctor was define, etc) copy ctor is called</div><div>3) if base class move was explicitly deleted, compile time error</div><div><br></div><div>I was surprised by #2.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 4:51 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Mar 17, 2016 at 1:41 PM, don hinton <span dir="ltr"><<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Dave:<div><br></div><div>Won't this prevent UnresolvedSet from being movable?</div><div><br></div><div>I was under the impression that all subobjects (base class in this case) had to be movable in order for the compiler to generate implicit move ops.  Is that not the case?</div></div></blockquote><div><br></div></span><div>Yeah, I think you're right (I thought the language had been fixed/changed here, so that a type with a copyable-but-not-movable member, and a movable (but possibly non-copyable member) could still be moved, and just move the moveable parts and copy the non-movable parts - but I can't see any evidence of that). Added explicit (empty) move ops in r263747</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>thanks...</div><span><font color="#888888"><div>don</div></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 2:28 PM, David Blaikie via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: dblaikie<br>
Date: Thu Mar 17 13:28:16 2016<br>
New Revision: 263732<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=263732&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=263732&view=rev</a><br>
Log:<br>
Remove defaulted move ops, the type is zero-cost copyable anyway, so there's no need for specific move ops<br>
<br>
(addresses MSVC build error, since MSVC 2013 can't generate default move<br>
ops)<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/AST/UnresolvedSet.h<br>
<br>
Modified: cfe/trunk/include/clang/AST/UnresolvedSet.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/UnresolvedSet.h?rev=263732&r1=263731&r2=263732&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/UnresolvedSet.h?rev=263732&r1=263731&r2=263732&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/AST/UnresolvedSet.h (original)<br>
+++ cfe/trunk/include/clang/AST/UnresolvedSet.h Thu Mar 17 13:28:16 2016<br>
@@ -61,9 +61,7 @@ private:<br>
   template <unsigned N> friend class UnresolvedSet;<br>
   UnresolvedSetImpl() = default;<br>
   UnresolvedSetImpl(const UnresolvedSetImpl &) = default;<br>
-  UnresolvedSetImpl(UnresolvedSetImpl &&) = default;<br>
   UnresolvedSetImpl &operator=(const UnresolvedSetImpl &) = default;<br>
-  UnresolvedSetImpl &operator=(UnresolvedSetImpl &&) = default;<br>
<br>
 public:<br>
   // We don't currently support assignment through this iterator, so we might<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>