Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2004-02-08 17:20:44

David Abrahams wrote:

> Daniel Wallin <dalwan01_at_[hidden]> writes:
>>With Mojo you would do something like:
>> struct X : moveable<X>
>> {
>> X(X&);
>> X(constant_ref<X>);
>> X(rvalue_ref<X>); // move constructor
>> };
>>And it would always move from rvalues.
> Meaning that you could pass an X rvalue by-value to an X parameter
> without any deep copying?


>>The intrusive part was that to
>>solve the whole "binding rvalues to const&" problem you needed to return
>>some special wrapper type:
>> moved<X> f();
> Oh, really? Too bad; I guess this isn't really much of an innovation
> then.

I don't know, it's still cool. Maybe your version breaks less rules, or
breaks the rules less? ;) I'm not familiar enough with these rules to

Daniel Wallin

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