Hi Eric,

Its a standard design of the STL that only < operators are required
for default sort, the > operator is done by swapping the values i.e.

 a > b   become b < a

In porting the OSG across to not rely on the > operator, this is what I did.

Both of your errors will be fixed by this.

Robert.

On 6/30/06, E. Wing <[EMAIL PROTECTED]> wrote:
> Hi Eric,
>
> I'm afraid some recent changes to ref_ptr<> saw the removal of the
> operator >, this is a step towards being more consistent with the
> boost shared_ptr.
>
> If its removal is too trublesome I can easily add it back in.
>
> Robert.

This is the only case I see using the operator so I might be able to
live without it. Will the following change work?
Instead of:
if (_originalGen<hit._originalGen) return true; // this compiles
if (_originalGen>hit._originalGen) return false;  // compile error here

Do this:
if (_originalGen<hit._originalGen) return true;
else if (_originalGen==hit._originalGen) return true;
else return false;

Will this do what I expect?


As for the const_iterator problem that one bugs me more and affects
more code. Is there a fix for that?

Thanks,
Eric
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to