This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/52433] [C++11] debug mode iterators need to move
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Feb 2012 12:58:04 +0000
- Subject: [Bug libstdc++/52433] [C++11] debug mode iterators need to move
- Auto-submitted: auto-generated
- References: <bug-52433-4@http.gcc.gnu.org/bugzilla/>
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;
}