大家看下面这个代码中向量迭代器的_Myptr变量用什么代替,源程序的无发编译通过
template<class T> inline uintmax_idx( const vector<T> &v )
{
return (uint)(max_element(v.begin(),v.end())._Myptr-v.begin()._Myptr);
}
1>e:\research\coding\tracking\miltracker-v1.0\boosttrackerpublic\Public.h(184): error C2039: “_Myptr”: 不是“std::_Vector_const_iterator<_Myvec>”的成员
1> with
1> [
1> _Myvec=std::_Vector_val<float,std::allocator<float>>
1> ]
1> Generating Code...
1>
auto_ptr的成员 _Ty *_Myptr;
allocator<void>类模版中的 typedef void _Ty;