From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20515 invoked by alias); 25 Jan 2012 15:03:14 -0000 Received: (qmail 20504 invoked by uid 22791); 25 Jan 2012 15:03:13 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jan 2012 15:03:00 +0000 From: "marc.glisse at normalesup dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/51981] Missing uninitialized_move() implementation? Date: Wed, 25 Jan 2012 15:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: marc.glisse at normalesup dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-01/txt/msg02942.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51981 --- Comment #5 from Marc Glisse 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...