Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-10-12 09:07:16

Thorsten Ottosen wrote:
> Peter Dimov wrote:
>> Thorsten Ottosen wrote:
>>> I think the bug is that the compiler does not allow one to take the
>>> adress of a temporary object (an rvalue). Normal compilers usually
>>> give a warning about it, but compile it.
>> Such code is ill-formed. No compiler is required to accept it.
> Ok.
> I guess I can add operator&() for the proxy returned by *iter;

Since your iterator doesn't return a true reference, I don't see what is
gained by allowing & on it. Most people that use &*i do that to obtain a
real pointer to the element (Container::value_type*), not a
Container::pointer. Nobody is quite sure what Container::pointer is supposed
to represent; the standard containers use it as an alias for

Boost list run by bdawes at, gregod at, cpdaniel at, john at