Subject: [Boost-bugs] [Boost C++ Libraries] #11786: Shouldn't boost::container::vector handle self-move-assignment?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-11-06 16:30:02
#11786: Shouldn't boost::container::vector handle self-move-assignment?
--------------------------------+------------------------
Reporter: fredrik.astrom89@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
Version: Boost 1.59.0 | Severity: Problem
Keywords: |
--------------------------------+------------------------
Right now boost::container::vector disallows self-move-assignment. Looking
at this seems to have been done by mistake.
The code in question(taken from the function priv_move_assign in
boost/container/vector.hpp) says:
{{{
//for move constructor, no aliasing (&x != this) is assummed.
BOOST_ASSERT(this != &x);
}}}
(where x is the parameter)
As this isn't a move constructor I can only assume this is a mistake.
If it isn't a mistake, just a bad comment, then I'd still argue that this
should be changed. Mostly because VS2015 implementation of
std::stable_partition assumes that self-move-assignment works...
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11786> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC