<div dir="ltr"><div>I thought that std::vector would have a noexcept move constructor and assignment given that all of it's member are noexcept in regard of move construction and assignment. Then again, i forgot about the allocator. But that mean that the default allocator is not noexcept when doing a move construction of assignment?<br>
</div><div><br></div><div>When we do a move construction or assignment of a vector with the default allocator, there shouldn't be any actual heap allocation going on. no?</div><div><br></div><div>Also if it now crash thats is new. I am synched from about 3 days ago and it was compiling with error but not crashing.</div>
<div><br></div><div>Thanks alot!</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 11:22 PM, Steve Ramsey <span dir="ltr"><<a href="mailto:clang@lucena.com" target="_blank">clang@lucena.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Oct 2, 2013, at 4:56 PM, Manu <<a href="mailto:monamimani@gmail.com">monamimani@gmail.com</a>> wrote:<br>

</div><div><div class="h5">> Hi this simple code is causing compilation error.<br>
> class Foo<br>
> {<br>
> public:<br>
><br>
>   Foo(Foo&&) noexcept = default;<br>
>   Foo& operator=(Foo&&) noexcept = default;<br>
><br>
>   Foo()<br>
>   {<br>
>   }<br>
><br>
> private:<br>
><br>
>   std::vector<std::string> vectorFoo_;<br>
> };<br>
><br>
> see errors here<br>
> <a href="http://coliru.stacked-crooked.com/a/ab2fb522c4982c72" target="_blank">http://coliru.stacked-crooked.com/a/ab2fb522c4982c72</a><br>
><br>
> But if I use libstdc++ it compile fine. So where is the bug libc++ or libstdc++?<br>
<br>
</div></div><div class="im">Didn’t check your link or try your code, but this might be because std::vector doesn’t have a nothrow move constructor or a nothrow move-assignment operator.<br>
<br>
                        Steve<br>
<br>
<br>
</div>_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@cs.uiuc.edu">cfe-users@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users</a><br>
</blockquote></div><br></div>