boost::ptr_vector and find_if

后端 未结 3 1981
心在旅途
心在旅途 2021-01-28 18:53

I have a class:

//header file
class CMDatabase
{
    class Try;
    typedef boost::shared_ptr TryPtr;
    typedef boost::ptr_vector TryVect         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-28 19:24

    Sorry, For soem reason, i could not add comment to previous post, so I am writing it as answer.

    I tried both the methods. First one gives, illegal indirection.

    And for the second one, it gives the same error: In verbose output, the details are as follows:

    c:\program files\microsoft visual studio 9.0\vc\include\functional(296) : error C2440: 'initializing' : cannot convert from 'const CMDatabase::Try' to 'CMDatabase::Try *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called c:\fta_chk\tools\channel_editor\ivodb\channellistupdate.cpp(103) : see reference to function template instantiation 'std::binder1st<_Fn2> std::bind1st,CMDatabase::Try>(const _Fn2 &,const _Ty &)' being compiled with [ _Fn2=std::mem_fun1_t, _Result=bool, _Ty=CMDatabase::Try, _Arg=CMDatabase::TryPtr ]

提交回复
热议问题