This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::vector default default and move constructors


On Thu, 11 Jan 2018, Marc Glisse wrote:

On Thu, 11 Jan 2018, François Dumont wrote:

-       void _M_swap_data(_Vector_impl& __x) _GLIBCXX_NOEXCEPT
+       void
+       _M_swap_data(_Vector_impl_data& __x) _GLIBCXX_NOEXCEPT
       {
         std::swap(_M_start, __x._M_start);
         std::swap(_M_finish, __x._M_finish);
         std::swap(_M_end_of_storage, __x._M_end_of_storage);
       }


I don't remember earlier discussions about this patch, but is this piece of code still needed? std::swap(*this, __x) looks like it should work.

Ah, no, there is a non-trivial move constructor, so forget it. I'll still need to rewrite that function later :-(

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]