Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-05-26 10:30:41


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, May 26, 2001 5:56 AM
Subject: [boost] Serializing a shared_ptr

> I propose the following additions:
>
> typedef <implementation-defined> shared_ptr_id; // ==, !=, key in assoc
> containers
>
> template<class T> shared_ptr_id shared_ptr<T>::id() const; // uniquely
> identifies the object

If the 'shared_ptr' itself defines the required operations (as it should),
there is no need for a separate 'shared_ptr_id' type. Also note that you
can get a 'void *' from a 'shared_ptr' by calling the 'get' member function
and casting the result to 'void *'.

--
Rainer Deyke (root_at_[hidden])
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

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