Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-09 11:46:45


Daniel Wallin wrote:
> Yes. At least if:
>> struct base {};
>> struct derived {};
indeed, that was a typo
>
> ^^^^^^^ is derived from base
>>
>> derived make_temp_derived(){ return derived; }
>> //scope..
>> {
>> base const & b = make_temp_derived();
>> ...
>> } <- the created temporary should last till here?

With my compiler, it gets destroyed immediately, so I made an
implementation that simply instantiates the variable.

Code is much simpler now, and it compiles on DM and Comeau.
Doc file "invariants.txt" is not yet updated, so I don't include it in
the attached zip.

Cheers!




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk