[Bug libstdc++/52433] [C++11] debug mode iterators need to move

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 29 13:02:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52433

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-29 13:01:25 UTC ---
Also untested, and sub-optimal (swapping would be better than copying):

      /**
       * @brief Move assignment.
       * @post @p __x is singular and unattached
       */
      _Safe_iterator&
      operator=(_Safe_iterator&& __x)
      {
    _Safe_iterator __tmp(std::move(__x));
        *this = __tmp;
        return *this;
      }



More information about the Gcc-bugs mailing list