This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

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


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[C++11] debug mode          |[C++11] debug mode
                   |iterators need move         |iterators need to move
                   |constructors                |

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-29 12:58:04 UTC ---
Also needs a move-assignment operator:

#define _GLIBCXX_DEBUG
#include <vector>

struct X {
    X() = default;
    X(const X&) = default;
    X(X&&) = default;
    X& operator=(X&&) = default;
    std::vector<int>::iterator i;
};

X f()
{
    X x;
    x = X();
    return x;
}


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