[C++-sig] eposing classes with protected destructors
Daniel Paull
dlp at fractaltechnologies.com
Mon Dec 23 06:31:14 CET 2002
I'm using VC6 and it seemed to have problems unless I put it in the
boost namespace. I figured that this was only a temporary work around
(until I hear otherwise!), so I wasn't too fussed.
Should it work with VC6? Nasty hacks like this are a pain and I'd like
to avoid them.
Cheers,
Dan
> -----Original Message-----
> From: c++-sig-admin at python.org [mailto:c++-sig-admin at python.org] On
Behalf
> Of David Abrahams
> Sent: Monday, 23 December 2002 1:26 PM
> To: c++-sig at python.org
> Subject: Re: [C++-sig] eposing classes with protected destructors
>
> "Daniel Paull" <dlp at fractaltechnologies.com> writes:
>
> > BTW, I also added a template function to get my source to compile:
> >
> > namespace boost {
> > template<class T> T * get_pointer( RefCountedObject<T> const& p )
> > {
> > return p.get();
> > }
> > }
> >
> > This should help anyone trying to reproduce the problem.
> >
> > Cheers,
> >
> > Daniel Paull
>
> Daniel,
>
> Unless your compiler doesn't support partial specialization, this
> function template should be in the same namespace as RefCountedObject
> so it can be found via argument-dependent lookup.
>
> -Dave
>
> --
> David Abrahams
> dave at boost-consulting.com * http://www.boost-consulting.com
> Boost support, enhancements, training, and commercial distribution
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
More information about the Cplusplus-sig
mailing list