Using boost::flyweight is supposed to help me save memory. I am looking for way to get a quantitative measurement on the effectiveness of the solution.
Is there a way to get the size() of the internal container? If its a hash based flyweight, is there a way to get info on bucket status? hash collisions, etc?
Any pointers will be appreciated.
Have a look at the source code of
boost::flyweight::hashed_factory_class
: you can just clone the code to derive your own user-defined factory and provide public (preferrableconst
) access to the internal container.