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.

Reply via email to