What is the main difference between std::set and boost::container::set ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The main difference between boost containers and standard containers is that boost containers allow for incomplete types. This can make a huge difference when implementing more complex data structures that rely on a combination of underlying containers.
There might be performance differences between boost containers and particular implementations of standard containers. But that could go either way.
EDIT: Here are some additional notes for set/map containers (see ref):
[multi]set/map containers are size optimized embedding the color bit of the red-black tree nodes in the parent pointer. [multi]set/map containers use no recursive functions so stack problems are avoided.