使用std :: find_if增强lambda不会编译

时间:2013-09-10 12:35:03

标签: boost-lambda c++

考虑某个类的模板成员方法:

template<typename T>
bool elementIsInSharedPtrVector(const T& p_elem, const std::vector< boost::shared_ptr< T > >& p_Vector) const
{
    return (std::find_if(p_Vector.begin(), p_Vector.end(), **boost::lambda::_1 == p_elem) != p_Vector.end());
}

编译器提供此错误(除了数百个模板错误):

usr/include/boost/pointee.hpp:30: error: no type named 'element_type' in 'struct SLnAdjW'

类型SLnAdjW是一个POD C结构,带有自由定义的==运算符函数。

我在这里做错了什么?

0 个答案:

没有答案
相关问题