This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51981] Missing uninitialized_move() implementation?
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2012 15:02:55 +0000
- Subject: [Bug libstdc++/51981] Missing uninitialized_move() implementation?
- Auto-submitted: auto-generated
- References: <bug-51981-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51981
--- Comment #5 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-25 15:02:55 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > It looks like it would be equivalent to uninitialized_copy with
> > make_move_iterator, not so useful then.
>
> This makes sense, but not so obvious for novices in C++11.
I don't think novices should use anything with "uninitialized" in the name.
Notice that very few functions on iterators have a move version. vector::insert
doesn't come with a move_insert counterpart.
> If continuing in this vein, then std::move() can be substituted by std::copy()
> with input iterator wrapped into make_move_iterator().
True, although there can be subtle differences for input iterators where the
reference type is not a reference to the value_type (there's a DR about that).
> Then std::move() is not so useful :)
Indeed. The standard tries to keep a balance, and I guess move was considered
common enough to deserve its own interface, but could easily have been removed.
Note that I don't think gcc's bugzilla is the best place for such
discussions...