Subject: Re: [boost] [smart ptr] Any interest in copy-on-write pointer for C++11?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-02-13 12:43:01


Le 13/02/13 16:46, Ralph Tandetzky a écrit :
>
> * pointer-semantics or value-semantics and nullptr (brought up by
> Vincente)
>
> - Should the COW-class be nullable? If not, then it should probably
> not be called cow_ptr.
> - This question has not been discussed to the end yet. Personally, I
> don't think that null-cow_ptrs are very useful.
>
> * Different member and non-member functions (brought up by Vincente)
>
> - relational operators (brought up by Vincente)
>
> - It is not clear, whether operator==() on cow_ptrs should only
> compare pointers or also pointees. This would depend on whether
> the COW-class is considered a pointer or a genuine value.
>
If you choose for your class to have value semantics the relational
operator should compare pointees.

Vicente