[odb-users] Inverse side of std::map with object pointer as key
Boris Kolpackov
boris at codesynthesis.com
Mon Oct 28 10:33:08 EDT 2019
Per Edin <per.edin at sequence-point.se> writes:
> I'm having some trouble getting an inverse pragma to work for the
> following code snippet, see the comment NOT LOADED.
>
> vector< weak_ptr< location > > locations; // NOT LOADED
>
> map< shared_ptr< item >, long > items;
We actually did some work to allow using object pointers as map keys
in this commit:
https://git.codesynthesis.com/cgit/odb/odb/commit/?id=4c87055fbbf4b36224cc4003cc9ae38023390400
Just to confirm you are using something reasonably recent from the
2.5.0 beta series, correct?
If so, perhaps we didn't handle the inverse part of things. Feel free
to dig around the code and suggest a fix/patch ;-).
More information about the odb-users
mailing list