objects and associated metadata in a single vecctor of pairs
Could you, please, consider implementing a function of FindMany / FindManyP, that can return vector of std::pairs of objects and metadata associated to them? I know there are functions at() and data() which return both things separately and I can merge it as I like. However, as we start using metadata of assns more often I thought this can be convenient and logical feature of the framework itself.
#3 Updated by Rob Kutschke almost 4 years ago
I have two suggestions.
My strong preference is not to use std::pair. Instead write a class template that gives better names to the accessors than first and second.
Whether or not you go with the first suggestions, the std::pair or pair-like-thing should hold pointers to the associated object and the metadata, not copies.
Finally, if you go with the class template solution, the named accessors can be functions that return const& ( and the data members can be whatever makes sense, pointer to const or const&).