Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-02-26 16:33:11

Matias Capeletto wrote:
> On 2/26/07, Thorsten Ottosen <thorsten.ottosen_at_[hidden]> wrote:

>>What if you make the members of the view pairs something like
>>template< class Pair& >
>>struct get_first
>> Pair& p_;
>> operator typename Pair::first_type&() const
>> { return p_.first; }
> It is a possible way to achieve the same results. The problem with it
> is that the size of the resulting pair will be two references bigger.
> This option was analyze and discarded for that reason.

Not understood. A pair of references pair<T&,U&>
requires one to store 2 references. My skecth above
would also require 2 references.

A smart compiler might know it is the same reference store twice
snd do some optimization.


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