Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-11 09:40:18


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 10 April 2008 19:13 pm, Daniel Frey wrote:
> I like that you call _internal_accept_owner on T* directly, still I
> think that I template class for tagging has some advantages. See the
> attached code I played with. In it, A has the role of the tag class. As
> the code shows, it is possible to have multiple classes like these, you
> just need some manual forwarding in the more complicated cases.

I don't understand what the benefit will be when applied to
shared_ptr_observer? All I get from the example is that if you have a class
X derived from A<T>, you can tell whether X and T are the same type or not.
Manual forwarding works just as well without a template parameter. Maybe if
you explained (as if writing user documentation for the feature) what the
template argument of shared_ptr_observer is supposed to be set to, and what
effect it would have? The behavior associated with a non-template
shared_ptr_observer tag can be spelled out in 1 or 2 sentences.

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH/2pH5vihyNWuA4URAquYAKDTKLDvhhPwR2iX1z1ZVTa+U10cfwCggxu4
UiOrwvqiVdcGY7uMhyjeDjc=
=7v9/
-----END PGP SIGNATURE-----


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