Boost logo

Boost Users :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-06-24 10:38:32


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

On Tuesday 24 June 2008 09:43 am, John wrote:
> This pattern/idiom is well-established:
>
> struct A {
> virtual A* clone () = 0;
> };
>
> struct B : public A {
> virtual B* clone ();
> };
>
>
> But the above does not work when the pointers A* and B* are replaced by
> shared_ptr<A> and shared_ptr<B>:
>
> struct A {
> virtual shared_ptr<A> clone () = 0;
> };
>
> struct B : public A {
> virtual shared_ptr<B> clone ();
> };
>
>
> Is there a workaround? Another way to solve the same problem? Thanks!

See:

http://lists.boost.org/boost-users/2003/02/2996.php
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIYQbo5vihyNWuA4URAgX3AJ4sXKFJod/S/HhSgw9pPl+ODY6qLwCbBk9s
navD7l4mPLsoDQpEezfm1a0=
=CeuK
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net