
"Non-NULL" is different than "valid". Maybe such a thing should be called nonnull_ptr<>? In the case of passive_ptr<>, I do allow it to be NULL. While a nonnull_ptr<> would useful, it would only cover some of the cases in which I use passive_ptr<>. I don't see why you'd have to check for NULL upon copy or assignment from another nonnull_ptr<>. It only needs to check in the constructor and when the value is directly changed. In fact, aside from that runtime check and the ability to alter the value, I don't really see what it buys you over using a reference. Also, whether the value is NULL is orthogonal to ownership - I could imagine having a nonnull_shared_ptr<>, nonnull_scoped_ptr<>, etc. Matt -----Original Message----- From: Klaim - Joël Lamotte [mailto:mjklaim@gmail.com] Sent: Wed 3/16/2011 6:37 PM To: boost@lists.boost.org Cc: Gruenke, Matt Subject: Re: [boost] [valid_ptr] proposing a new type of pointer object that allows validity tracking without memory management and object ownership As far as I understand, it's only a type working like a raw pointer but with checks on assignation and copy. Those checks will only assume that the pointer don't have a NULL value, (or maybe points to an adress that i'snt possible?) is it correct understanding of this library? Joël Lamotte.