【问题标题】:Boost Container vs Boost multi_index_containerBoost Container vs Boost multi_index_container
【发布时间】:2016-06-22 17:04:04
【问题描述】:

boost::container 类与 boost::multi_index_container 相比有什么优势?

他们既可以将数据存储在共享内存中,又可以使用 Boost.Interprocess(对我来说很重要),而且 multi_index_container 似乎提供了更高级的功能。

multi_index_container 缺少容器的哪些功能?

参考资料: http://www.boost.org/doc/libs/1_61_0/libs/multi_index/doc/tutorial/creation.html#special_allocator http://www.boost.org/doc/libs/1_61_0/doc/html/container.html

【问题讨论】:

    标签: performance boost containers boost-interprocess boost-multi-index


    【解决方案1】:

    Boost.Container 不是单个类,而是具有各种接口(尽管它们都基于 STL 约定)和内部数据结构的容器集合,因此与 Boost.MultiIndex 的multi_index_container 的功能比较实际上取决于什么您感兴趣的特定容器。无论如何,Boost.Container multi_index_container 中的所有容器都可以与 Boost.Interprocess 一起放置在共享内存中,但如果这是唯一的非标准功能你找我猜你可能想坚持boost::container::set或类似的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-06
      • 1970-01-01
      • 2014-12-02
      • 2010-12-14
      • 1970-01-01
      • 2021-04-25
      • 1970-01-01
      相关资源
      最近更新 更多