简体   繁体   English

为什么没有boost :: container :: queue?

[英]Why is there no boost::container::queue?

I am starting to work with Boost, and I am looking through the several libraries it holds. 我开始使用Boost,并且正在浏览它拥有的几个库。

I have noted that boost::container defines almost all standard containers, but not the queue . 我注意到,boost :: container定义了几乎所有标准容器,但没有定义queue

I don't have found any reference to it; 我没有找到任何参考。 so I am wondering why there is only deque . 所以我想知道为什么只有deque I want to test the replacement of STL containers with boost ones, and I was told it would be possible... 我想测试用Boost容器替换STL容器,并被告知这是可能的...

Thanks in advance for any explanation on this subject. 预先感谢您对此主题的任何解释。

std::queue isn't a container, it's a wrapper. std::queue不是容器,而是包装器。 It consumes a container and provides a non-container (simplified) interface. 它使用一个容器并提供一个非容器(简化)的接口。

The Boost version of std::queue<T> (which actually means std::queue<T, std::deque<T> > , via a default template argument) is std::queue<T, boost::container::deque<T> > . Boost版本的std::queue<T> (实际上是通过默认模板参数表示std::queue<T, std::deque<T> > )是std::queue<T, boost::container::deque<T> >

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用boost :: lockfree :: queue实体填充容器 - How to populate container with boost::lockfree::queue entities C ++ boost - 是否有一个容器像直接密钥访问的队列一样工作? - C++ boost - Is there a container working like a queue with direct key access? Boost或C ++ 11中是否有一个容器作为队列但具有独特的元素? - Is there a container in Boost or C++11 which act as a queue but with unique elements? 为什么在优先级队列中使用容器参数进行重载? - Why is a container parameter used in a priority queue for overloading? 为什么队列接受vector作为其底层容器? - Why queue accepts vector as its underlying container? 为什么这个 boost::beast 代码在 boost 1.75.0 中挂在容器内而不是在容器外部,而不是在 boost 1.67.0 中? - Why does this boost::beast code hang inside a container but not outside of it in boost 1.75.0 but not boost 1.67.0? 为什么boost :: container :: string和std :: string比较无法按预期进行? - Why is this boost::container::string & std::string comparison not working as intended? boost :: container :: vector比std :: vector快吗? 为什么? - Is boost::container::vector faster than std::vector? Why? 为什么`boost :: container :: flat_set`不是&#39;nothrow_move_constructible`? - Why is `boost::container::flat_set` not `nothrow_move_constructible`? 提升SPSC队列段错误 - Boost spsc queue segfault
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM