std::bind:
Return value
A function object of unspecified type T, for which std::is_bind_expression<T>::value == true.
std::function:
so that typeid(TargetType)==target_type()
如果没猜错的话,应该是std::bind的return type是否满足std::function里这条要求是undefined
【 在 wuzhiqiu1 的大作中提到: 】
: 问题:在使用std::funciton的target成员传函数指针时,发现返回结果是空指针。
: Because function is a polymorphic wrapper class, it is unaware of the static type of its target callable object, and thus the template parameter TargetType must be explicitly specified.
: TargetType shall match the target type, so that typeid(TargetType)==target_type(). Otherwise, the function always returns a null pointer.
: ...................
--
FROM 122.224.174.*