Boost logo

Boost Users :

From: Max (LoadCom_at_[hidden])
Date: 2008-05-21 03:29:05


>Max wrote:
>> To make it clearer, I'm finding something like this:
>> class Foo
>> {
>> int & i_;
>> Foo& operator=(const Foo& rhs)
>> {
>> if(&rhs == this) return *this;
>> i_ = rhs.i_;
>> return *this;
>> }
>> }
>>
>> this is not accepted by my VC9 compiler.
>>
>
>It isn't? I don't see a problem (other than that it may not be what you
>intend),

Oops, It's indeed not my intention. What I wanted is to bind i_ to rhs.i_;

Thanks and B/Rgds.
Max


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net