Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get information on a boost::flyweight internal container?

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.

like image 391
dbbd Avatar asked Feb 02 '26 15:02

dbbd


1 Answers

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 (preferrable const) access to the internal container.

like image 158
Joaquín M López Muñoz Avatar answered Feb 04 '26 07:02

Joaquín M López Muñoz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!