[Bug libstdc++/48559] parallel-mode vs C++0x
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 12 19:20:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48559
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-12 19:20:29 UTC ---
(In reply to comment #2)
> On the other hand, we sometimes need references to elements of the
> random-access input sequence(s). We could always use an iterator, but that
> might be inefficient. And we cannot take the lvalue reference or the address
> of a dereferenced random access iterator, can we?
Yes you can for most iterators (not for move_iterator, but that's unusual)
> (Although this is
> unfortunately done so far in multiseq_selection.h.) Can we always take the
> rvalue reference of a dereferenced random access iterator?
No (you can for move_iterator).
For most iterators (especially random access iterators including pointers)
iterator_traits<It>::reference will be an lvalue reference.
More information about the Gcc-bugs
mailing list