Am 14.06.2016 um 13:33 schrieb Robert Osfield:
> Hi Ralf,
>
> I have now merged your changes and checked them into git master.
>
> I have spotted an issue though, the FileNameOptionsPair key will do a
> pointer comparison on the Options objects rather than comparing
> contents. This means that simply using std::pair or not providing a
> custom comparison operator to the map won't be sufficient we'll need
> to provide a custom comparison operator that dereferences the Option
> object.
>
> Thoughts?
I just prepared an additional osgobjectcache example to have a valid
object cache related test environment and stumbled also over this issue.
The initial patch contains already comparing operaters in Options
class, but they are not called :-(
-
+ bool operator < (const Options &rhs) const;
+ bool operator == (const Options &rhs) const;
virtual ~Options() {}
>From
http://stackoverflow.com/questions/3277172/using-pair-as-key-in-a-map-c-stl
it looks that a operator < for the complete key type is required.
Ralf
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org