[英]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.