public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/51960] New: Missing move-assignment operator in raw_storage_iterator
@ 2012-01-23 10:45 valyala at gmail dot com
  2012-01-23 11:47 ` [Bug libstdc++/51960] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: valyala at gmail dot com @ 2012-01-23 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51960
           Summary: Missing move-assignment operator in
                    raw_storage_iterator
    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 why raw_storage_iterator (
http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/include/bits/stl_raw_storage_iter.h?revision=169421&view=markup
) doesn't provide move-assignment operator? Such an operator would allow moving
items to a raw memory instead of copying them. In this case the
raw_storage_iterator could be properly used with std::move()-like algorithms:

template <typename InputIterator, typename T>
void move_to_raw_buffer(InputIterator first, InputIterator last, T *raw_buffer)
{
  std::move(first, last, std::raw_storage_iterator<T *, T>(raw_buffer));
}

Currently this results in items' copying instead of expected items' movement
due to the lack of move-assignment operator in the raw_storage_iterator
implementation.


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

end of thread, other threads:[~2012-03-22 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-23 10:45 [Bug libstdc++/51960] New: Missing move-assignment operator in raw_storage_iterator valyala at gmail dot com
2012-01-23 11:47 ` [Bug libstdc++/51960] " redi at gcc dot gnu.org
2012-03-22 10:51 ` paolo.carlini at oracle dot com
2012-03-22 11:15 ` [Bug libstdc++/51960] [DR 2127] " redi at gcc dot gnu.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).