Boost logo

Boost Users :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-05-19 16:04:38


----- Original Message -----
From: "John Femiani" <JOHN.FEMIANI_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Monday, May 19, 2008 9:47 PM
Subject: Re: [Boost-users] Is it possible to make a class
assignablewithrefmembers

>
>>
>> > hello all,
>> >
>> > One little question: is it possible to make a class
>> assignable which
>> > has reference type members?
>>
>>
>> Hello Max,
>>
>> yes it is possible. Just assign the reference member of the
>> rhs to the the reference member of the lhs.
>>
>
>
> I think he wanted the references to be copied the way pointers would be;
> i.e after A = B, A refers to the same objects B does (not a copy).
>
> I dont think you can change reference to refer to another object once it
> is initialized (sec 8.5.3 par. 2). I wonder if you can use placement new
> and make the assignment operator for your class invoke a copy
> constructor?
>

I'm really sorry. I don't know what I was thinking on.

Vicente


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