public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/51981] New: Missing uninitialized_move() implementation?
@ 2012-01-24 17:34 valyala at gmail dot com
  2012-01-24 17:42 ` [Bug libstdc++/51981] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: valyala at gmail dot com @ 2012-01-24 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51981
           Summary: Missing uninitialized_move() implementation?
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: valyala@gmail.com


It's interesting to know why uninitialized_copy()'s counterpart -
uninitialized_move() - is missing in
http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/include/bits/stl_uninitialized.h?revision=177542&view=markup
?

See boost's docs for details -
http://www.boost.org/doc/libs/1_48_0/doc/html/boost/uninitialized_move.html .


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/51981] Missing uninitialized_move() implementation?
  2012-01-24 17:34 [Bug libstdc++/51981] New: Missing uninitialized_move() implementation? valyala at gmail dot com
@ 2012-01-24 17:42 ` redi at gcc dot gnu.org
  2012-01-25  0:03 ` marc.glisse at normalesup dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-24 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-24 16:46:12 UTC ---
Because it's non-standard


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/51981] Missing uninitialized_move() implementation?
  2012-01-24 17:34 [Bug libstdc++/51981] New: Missing uninitialized_move() implementation? valyala at gmail dot com
  2012-01-24 17:42 ` [Bug libstdc++/51981] " redi at gcc dot gnu.org
@ 2012-01-25  0:03 ` marc.glisse at normalesup dot org
  2012-01-25 14:59 ` valyala at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marc.glisse at normalesup dot org @ 2012-01-25  0:03 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-24 23:01:09 UTC ---
It looks like it would be equivalent to uninitialized_copy with
make_move_iterator, not so useful then.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/51981] Missing uninitialized_move() implementation?
  2012-01-24 17:34 [Bug libstdc++/51981] New: Missing uninitialized_move() implementation? valyala at gmail dot com
  2012-01-24 17:42 ` [Bug libstdc++/51981] " redi at gcc dot gnu.org
  2012-01-25  0:03 ` marc.glisse at normalesup dot org
@ 2012-01-25 14:59 ` valyala at gmail dot com
  2012-01-25 15:31 ` paolo.carlini at oracle dot com
  2012-01-25 15:34 ` marc.glisse at normalesup dot org
  4 siblings, 0 replies; 6+ messages in thread
From: valyala at gmail dot com @ 2012-01-25 14:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Aliaksandr Valialkin <valyala at gmail dot com> 2012-01-25 14:38:50 UTC ---
(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.

If continuing in this vein, then std::move() can be substituted by std::copy()
with input iterator wrapped into make_move_iterator(). Then std::move() is not
so useful :)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/51981] Missing uninitialized_move() implementation?
  2012-01-24 17:34 [Bug libstdc++/51981] New: Missing uninitialized_move() implementation? valyala at gmail dot com
                   ` (2 preceding siblings ...)
  2012-01-25 14:59 ` valyala at gmail dot com
@ 2012-01-25 15:31 ` paolo.carlini at oracle dot com
  2012-01-25 15:34 ` marc.glisse at normalesup dot org
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-25 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-25 15:00:26 UTC ---
Marc gave you an important practical advice and rationale, but as matter of
principle is more important that the function is *non standard*, really if you
use that you are *outside* the new C++11 Standard, is that clear? And the name
isn't uglified thus even if we wanted we could not add it and remain
conforming. This issue is invalid.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/51981] Missing uninitialized_move() implementation?
  2012-01-24 17:34 [Bug libstdc++/51981] New: Missing uninitialized_move() implementation? valyala at gmail dot com
                   ` (3 preceding siblings ...)
  2012-01-25 15:31 ` paolo.carlini at oracle dot com
@ 2012-01-25 15:34 ` marc.glisse at normalesup dot org
  4 siblings, 0 replies; 6+ messages in thread
From: marc.glisse at normalesup dot org @ 2012-01-25 15:34 UTC (permalink / raw)
  To: gcc-bugs

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...


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-25 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24 17:34 [Bug libstdc++/51981] New: Missing uninitialized_move() implementation? valyala at gmail dot com
2012-01-24 17:42 ` [Bug libstdc++/51981] " redi at gcc dot gnu.org
2012-01-25  0:03 ` marc.glisse at normalesup dot org
2012-01-25 14:59 ` valyala at gmail dot com
2012-01-25 15:31 ` paolo.carlini at oracle dot com
2012-01-25 15:34 ` marc.glisse at normalesup dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).