简体   繁体   English

Boost :: bind和Boost Phoenix :: bind有什么区别?

[英]What is the difference between Boost::bind and Boost Phoenix::bind?

Boost :: bind和Boost Phoenix :: bind有什么区别?

phoenix::bind is like lambda::bind a function that returns an expression template that records that it has to call the given function. phoenix::bind就像lambda::bind一个函数,它返回一个表达式模板,记录它必须调用给定的函数。 These are designed to work together with phoenix and lambda, respectively. 它们分别与phoenix和lambda一起使用。 As a result, they contain much more things. 结果,它们包含更多的东西。 Like, the type they return overloads all possible operators so that their respective action can be recorded and executed later. 比如,它们返回的类型会重载所有可能的运算符,以便以后可以记录和执行它们各自的操作。

boost::bind is "just" a binder. boost::bind是“只是”一个活页夹。 It will bind the function, and return a type that has the function call operator overloaded, and not much more. 它将绑定函数,并返回一个函数调用运算符重载的类型,而不是更多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM