一旦C ++ 0x成为主流,增强的重叠部分会发生什么?

时间:2022-09-09 00:29:11

what will happen with the overlapping portion of boost once C++0x becomes mainstream?

一旦C ++ 0x成为主流,增强的重叠部分会发生什么?

Will boost still contain everything it used to, or will they adapt the library to update it with the new std:: stuff?

boost还会包含它曾经使用的所有内容,还是会调整库以使用新的std :: stuff更新它?

Will boost have both a normal c++ version and a c++0x version that they will maintain?

boost会有正常的c ++版本和c ++ 0x版本吗?

4 个解决方案

#1


One would hope that Boost continues to support existing classes, for a couple of reasons.

由于几个原因,人们希望Boost继续支持现有的课程。

First, there is a body of code that uses the overlapping features in Boost that needs to be supported, for some time.

首先,有一段时间使用Boost中需要支持的重叠功能的代码体。

Second, overlapping implementations allow me to select which one I'd prefer to use. There might be some difference between std::Frob and Boost::Frob that is important to my project, and having a choice is good.

其次,重叠实现允许我选择我更喜欢使用哪一个。 std :: Frob和Boost :: Frob之间可能存在一些差异,这对我的项目很重要,并且有一个选择是好的。

In the long term, though, I would expect a migration toward the standard from both the application writers and the tools providers. That makes it a less risky choice to go with std::.

但从长远来看,我希望从应用程序编写者和工具提供者那里向标准迁移。这使得与std ::一起使用它的风险较低。

#2


I am not affiliated with Boost and have no they idea what they will do but it seems like Boost will be left untouched.

我与Boost没有任何关系,他们不知道他们会做什么,但似乎Boost将保持不变。

There already has been released TR1 (VS 2008 feature pack) and Boost was left untouched. Since many users have not adopted Boost or TR1 yet, my prediction is that for at least next five years boost and c++0x libraries will exist in different namespaces and availaible for C++0x users as well as C++ users.

已经发布了TR1(VS 2008功能包),Boost保持不变。由于许多用户还没有采用Boost或TR1,我的预测是至少在未来五年内,boost和c ++ 0x库将存在于不同的名称空间中,并且对于C ++ 0x用户和C ++用户都是可用的。

#3


Namespaces make this somewhat of a non-issue for the Boost developers. There is no direct contention between the boost libraries and the standard libraries because they exist in separate namespaces. Therefore, changes to namespace std (for example the addition of std::tr1) have no direct impact on Boost.

对于Boost开发人员来说,命名空间对于这个问题来说有些问题。 boost库和标准库之间没有直接争用,因为它们存在于不同的命名空间中。因此,对命名空间std的更改(例如添加std :: tr1)对Boost没有直接影响。

Note however, that if you are importing both libraries (std and boost) into the global namespace, then you will have issues.

但请注意,如果要将两个库(std和boost)导入全局命名空间,那么您将遇到问题。

The following quote from the Boost TR1 documentation also sheds some light regarding Boost's implementation of TR1 components, suggesting that the corresponding Boost library will be maintained for the foreseeable future:

Boost TR1文档中的以下引用也揭示了Boost实现TR1组件的一些亮点,表明相应的Boost库将在可预见的未来得到维护:

The TR1 library provides an implementation of the C++ Technical Report on Standard Library Extensions. This library does not itself implement the TR1 components, rather it's a thin wrapper that will include your standard library's TR1 implementation (if it has one), otherwise it will include the Boost Library equivalents, and import them into namespace std::tr1.

TR1库提供了标准库扩展的C ++技术报告的实现。这个库本身并不实现TR1组件,而是一个瘦包装器,它将包含标准库的TR1实现(如果有的话),否则它将包含Boost Library等价物,并将它们导入命名空间std :: tr1。

#4


Do you mean tr1?

你是说tr1吗?

Boost already supports tr1. All the classes from boost that have been adopted into std::tr1 are available in this namespace from boost. See the following documentation.

Boost已经支持tr1。来自boost的所有类都已被采用到std :: tr1中,这个命名空间中的boost来自boost。请参阅以下文档。

http://www.boost.org/doc/libs/1_37_0/doc/html/boost_tr1.html

#1


One would hope that Boost continues to support existing classes, for a couple of reasons.

由于几个原因,人们希望Boost继续支持现有的课程。

First, there is a body of code that uses the overlapping features in Boost that needs to be supported, for some time.

首先,有一段时间使用Boost中需要支持的重叠功能的代码体。

Second, overlapping implementations allow me to select which one I'd prefer to use. There might be some difference between std::Frob and Boost::Frob that is important to my project, and having a choice is good.

其次,重叠实现允许我选择我更喜欢使用哪一个。 std :: Frob和Boost :: Frob之间可能存在一些差异,这对我的项目很重要,并且有一个选择是好的。

In the long term, though, I would expect a migration toward the standard from both the application writers and the tools providers. That makes it a less risky choice to go with std::.

但从长远来看,我希望从应用程序编写者和工具提供者那里向标准迁移。这使得与std ::一起使用它的风险较低。

#2


I am not affiliated with Boost and have no they idea what they will do but it seems like Boost will be left untouched.

我与Boost没有任何关系,他们不知道他们会做什么,但似乎Boost将保持不变。

There already has been released TR1 (VS 2008 feature pack) and Boost was left untouched. Since many users have not adopted Boost or TR1 yet, my prediction is that for at least next five years boost and c++0x libraries will exist in different namespaces and availaible for C++0x users as well as C++ users.

已经发布了TR1(VS 2008功能包),Boost保持不变。由于许多用户还没有采用Boost或TR1,我的预测是至少在未来五年内,boost和c ++ 0x库将存在于不同的名称空间中,并且对于C ++ 0x用户和C ++用户都是可用的。

#3


Namespaces make this somewhat of a non-issue for the Boost developers. There is no direct contention between the boost libraries and the standard libraries because they exist in separate namespaces. Therefore, changes to namespace std (for example the addition of std::tr1) have no direct impact on Boost.

对于Boost开发人员来说,命名空间对于这个问题来说有些问题。 boost库和标准库之间没有直接争用,因为它们存在于不同的命名空间中。因此,对命名空间std的更改(例如添加std :: tr1)对Boost没有直接影响。

Note however, that if you are importing both libraries (std and boost) into the global namespace, then you will have issues.

但请注意,如果要将两个库(std和boost)导入全局命名空间,那么您将遇到问题。

The following quote from the Boost TR1 documentation also sheds some light regarding Boost's implementation of TR1 components, suggesting that the corresponding Boost library will be maintained for the foreseeable future:

Boost TR1文档中的以下引用也揭示了Boost实现TR1组件的一些亮点,表明相应的Boost库将在可预见的未来得到维护:

The TR1 library provides an implementation of the C++ Technical Report on Standard Library Extensions. This library does not itself implement the TR1 components, rather it's a thin wrapper that will include your standard library's TR1 implementation (if it has one), otherwise it will include the Boost Library equivalents, and import them into namespace std::tr1.

TR1库提供了标准库扩展的C ++技术报告的实现。这个库本身并不实现TR1组件,而是一个瘦包装器,它将包含标准库的TR1实现(如果有的话),否则它将包含Boost Library等价物,并将它们导入命名空间std :: tr1。

#4


Do you mean tr1?

你是说tr1吗?

Boost already supports tr1. All the classes from boost that have been adopted into std::tr1 are available in this namespace from boost. See the following documentation.

Boost已经支持tr1。来自boost的所有类都已被采用到std :: tr1中,这个命名空间中的boost来自boost。请参阅以下文档。

http://www.boost.org/doc/libs/1_37_0/doc/html/boost_tr1.html