Thougts are inline...
On Fri, Oct 3, 2008 at 3:06 PM, Robert Osfield <[EMAIL PROTECTED]>wrote:
> Hi Neil,
>
> I think the way forward for here is to merge your change with my Cmake
> controlled optional compile block in
>
> #ifdef OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
> // implicit output conversion
> operator T*() const { return _ptr; }
> #else
> // comparison operators for ref_ptr.
> bool operator == (const ref_ptr& rp) const { return (_ptr==rp._ptr);
> }
> bool operator == (const T* ptr) const { return (_ptr==ptr); }
> friend bool operator == (const T* ptr, const ref_ptr& rp) {
> return (ptr==rp._ptr); }
>
> bool operator != (const ref_ptr& rp) const { return (_ptr!=rp._ptr);
> }
> bool operator != (const T* ptr) const { return (_ptr!=ptr); }
> friend bool operator != (const T* ptr, const ref_ptr& rp) {
> return (ptr!=rp._ptr); }
>
> bool operator < (const ref_ptr& rp) const { return (_ptr<rp._ptr); }
> #endif
>
> And have OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION on by default,
> then let it get tested across platforms and with end user application
> builds/executation. If things go way then we could possible invert
> the #def so that the old code requires the define, or possible scrub
> the old completely depending on how the community feel about the
> suitability of going with the new implicit output conversion.
>
> Thoughts?
>
I absolutely agree with your approach in every detail. It's a good idea to
have an escape plan, but I think this will be a good default.
Let me know if I can be of any assistance.
Regards,
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