|
Boost : |
Subject: Re: [boost] intrusive_ptr design question
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-07-06 00:55:18
2009/7/5 Zachary Turner <divisortheory_at_[hidden]>:
> I was wondering from a design perspective, why was it decided that
> intrusive_ptr should rely on user-defined free functions
> intrusive_ptr_add_ref and intrusive_ptr_release to handle the
> reference counting? Â This makes it somewhat inconvenient, for some
> constant type T, to support having two different instances of
> intrusive_ptr<T>, each of which use a different reference counting
> strategy.
>
I'm rather confused why you'd want to keep 2 different reference
counts in an object. As a workaround though, why not just use struct
T1 : T {}; and struct T2 : T {}; if you need 2 distinct kinds?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk