Hi Robert,

On Fri, Oct 3, 2008 at 10:29 AM, Robert Osfield <[EMAIL PROTECTED]>wrote:

> Hi Neil,
>
> I have now merged your changes, and fingers crossed they will port
> just fine across all out platforms.
>
> > Is the community aware of the 'unspecified_bool_type' idiom used within
> > boost smart pointers to allow safe conversion to bool? If the community
> > wishes I would be happy to add this feature.
>
> Originally I did have method for using a ref_ptr<> as a bool, but the
> code didn't port well back when I wrote it, we are talking 2000/2001
> time frame so quite a while back...
>
> Feel free to implement the safe type conversion to bool as it would be
> useful addition as long as it compiles.
>

I'll do this within the next week.


>
> Another possible addition would be automatic conversion to a C
> pointer, but this is something that submissions have also experimented
> with in the past and failed to get working safely across platforms.
> But as with all the ref_ptr<> changes it was a while back and we've
> dropped one of most problem compilers of the bunch since then.  There
> is also the big question about implicit conversion of types...
>

This isn't an idea that has worked well historically despite the clear
attraction to behave like a raw pointer. It often leads to bugs in client
code. This was the rationale for all of the boost smart pointers and the
std::tr1::shared_ptr having a get() function instead.

Thanks for listening and responding.

Neil Groves


>
> Robert.
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to