Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-02-14 17:54:06


Rob Stewart wrote:

>That's definitely better. You don't want to make it pretty when
>someone adds this feature. However, given that the need for this
>behavior might be just common enough to make this addition to
>every Singleton type too much pain, how about another class
>template:
>
>template <typename T>
>class unsafe_singleton : public singleton<T>
>{
>public:
> //! WARNING: Do not delete the returned pointer!
> T * unsafe_get()
> {
> return this;
> }
>};
>
That's manageable, I can add that.

-Jason


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