Boost logo

Boost Users :

From: Jonathan Biggar (jon_at_[hidden])
Date: 2006-01-14 21:02:44


Jonathan Biggar wrote:
> You can drop a definition of the shared pointer inside the template class:
>
> template<typename T> class Foo {
> public:
>
> typedef shared_ptr<Foo> Ptr;
>
> };
>
> and then you could refer to it as Foo<T>::Ptr, although you'd need to
> use "typename" in some circumstances.

And of course that won't work if you need to use the shared_ptr in
contexts where Foo is not defined yet.

-- 
Jonathan Biggar
jon_at_[hidden]

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