且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

未指定的绑定

更新时间:2023-12-04 20:04:52

返回类型中的 unspecified 表示它是未指定的类型.该标准不需要从bind返回特定类型,只要返回的类型符合该标准规定的要求即可.

The unspecified in the return type means that it is a type that is, well, unspecified. The standard does not require a particular type to be returned from bind, as long as the returned type complies with the requirements that the standard mandates.

...开始,我不知道VS是否实现了它们,但是您会看到boost::bind的相同文档,并且它已经在不同版本的编译器中编译了一段时间,而这些版本没有可变参数模板支持...文档说明您可以传递不同类型的N参数,但这并不一定意味着只有一个模板可以执行此操作,可以按照一组1-ary,2- ary ... N-ary模板.

As of the ..., I don't know whether VS implements them or not, but you will see the same documentation for boost::bind, and it has been compiling in different compilers without variadic template support for some time already... the documentation states that you can pass N arguments of different types, but that does not necessarily mean that there is a single template that does it, it can be implemented in terms of a set of 1-ary, 2-ary... N-ary templates.

文档显示的是您预期会使用该软件的行为,而不是其实现方式的详细信息.

The documentation is showing the behavior that you can expect from using it, rather than the detail of how it is implemented.