Boost库 [英] Boost Library

查看:106
本文介绍了Boost库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

既然我已经使用这个网站开始,我不断听到Boost库。我想知道什么是一些Boost库(所以我为什么要使用它),以及如何携带的主要好处是Boost库?

Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library?

推荐答案

升压由标委会的几个成员组织。结果
所以这是一个滋生库,将在未来的标准。

Boost is organized by several members of the standard committee.
So it is a breeding ground for libraries that will be in the next standard.


  1. 这是一个扩展到STL(它填补了冷落位)

  2. 这是有据可查的。

  3. 这是很好同行评审。

  4. 它具有很高的活性,发现错误和固定快。

  5. 这是平台中立和作品无处不在。

  6. 它是免费使用。

使用TR1上来不久就高兴知道,升压已经有很多覆盖地面。很多TR1基本上都是直接从升压原件适应,因此,图书馆已久经考验。不同的是,他们已经搬进了性病:: TR1命名空间(而不是提升)。

With tr1 coming up soon it is nice to know that boost already has a lot of the ground covered. A lot of the libraries in tr1 are basically adapted directly from boost originals and thus have been tried and tested. The difference is that they have been moved into the std::tr1 namespace (rather than boost).

所有你需要做的是以下内容添加到你的编译器的默认包括搜索路径

All that you need to do is add the following to your compilers default include search path:

<boost-install-path>/boost/tr1/tr1

然后,当你包括标准头提升会自动导入所有需要的东西到命名空间的std :: TR1

Then when you include the standard headers boost will automatically import all the required stuff into the namespace std::tr1

要使用std :: tr1 :: share_ptr你只需要为包括LT;内存取代。这会给你所有的智能指针与一个文件。

To use std::tr1::share_ptr you just need to include <memory>. This will give you all the smart pointers with one file.

这篇关于Boost库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆