boost unordered map in shared memory using std::st

2020-04-14 09:09发布

Is it possible to use std::string or other complex structure key type with boost unordered map on shared memory? If so, can I find some sample code? I found some sample code for using unordered map on shared memory but were unable to change the key type to complex structure. Thanks

标签: c++ boost
1条回答
▲ chillily
2楼-- · 2020-04-14 09:51

Yes.

You can see an example here:

You will want to watch the overhead when doing lookups. Using non-standard key equality/hash functions can solve this:

查看更多
登录 后发表回答