As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。
7年前关闭。
自从我开始使用此网站以来,我一直在听有关Boost库的信息。我想知道Boost库的主要优点是什么(因此我为什么要使用它)以及Boost库的可移植性如何? 它是STL的扩展(它填充了遗漏的位) 有据可查。 经过同行评审。 它具有很高的 liveness ,因此可以快速发现并修复错误。 这是平台无关的,可在任何地方使用。 免费使用。
随着tr1即将推出,很高兴知道boost已经覆盖了很多 Realm 。 tr1中的许多库基本上都是直接从boost原版改编的,因此已经过尝试和测试。不同之处在于它们已移入std::tr1命名空间(而不是boost)。
您需要做的就是将以下内容添加到编译器的默认include search path中:
例如:
要使用std::tr1::share_ptr,您只需要包含。这将为您提供一个文件的所有智能指针。
7年前关闭。
自从我开始使用此网站以来,我一直在听有关Boost库的信息。我想知道Boost库的主要优点是什么(因此我为什么要使用它)以及Boost库的可移植性如何?
最佳答案
Boost由标准委员会的几名成员组织。
因此,它将成为下一个标准中图书馆的温床。
随着tr1即将推出,很高兴知道boost已经覆盖了很多 Realm 。 tr1中的许多库基本上都是直接从boost原版改编的,因此已经过尝试和测试。不同之处在于它们已移入std::tr1命名空间(而不是boost)。
您需要做的就是将以下内容添加到编译器的默认include search path中:
<boost-install-path>/boost/tr1/tr1
然后,当您包含标准 header 时,boost将自动将所有必需的内容导入 namespace std::tr1例如:
要使用std::tr1::share_ptr,您只需要包含。这将为您提供一个文件的所有智能指针。