
19 Jan
2013
19 Jan
'13
6:59 p.m.
"As a general rule, if it isn't obvious whether intrusive_ptr better fits your needs than shared_ptr, try a shared_ptr-based design first."
but does not explain why.
If the classes involved are all my own and deriving them all from a base class that implements reference-counting is not a problem, what are some reasons to prefer shared_ptr to intrusive_ptr?
Because shared_ptr doesn't require *any* additional code (which should be designed, implemented, tested, supported, etc).