Не получается заставить работать следующий код. Есть идеи или это впринципе не возможно.
| Код | struct TextContent { / public: /... bool x_less( long max ) { return x < max; } }; /... vector<TextContent> pageContents; //... pageContents.erase(remove_if(pageContents.begin(), pageContents.end(), bind2nd(mem_fun1(&TextContent::y_less),100)),pageContents.end() );
|
| Цитата | c:\program files\microsoft visual studio\vc98\include\algorithm(50) : error C2664: '()' : cannot convert parameter 1 from 'struct AV_Parser::TextContent' to 'struct AV_Parser::TextContent *const & ' Reason: cannot convert from 'struct AV_Parser::TextContent' to 'struct AV_Parser::TextContent *const ' No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called c:\program files\microsoft visual studio\vc98\include\algorithm(299) : see reference to function template instantiation 'struct AV_Parser::TextContent *__cdecl std::find_if(struct AV_Parser::TextContent *,struct AV_Parser::TextContent *,clas s std::binder2nd<class std::mem_fun1_t<bool,struct AV_Parser::TextContent,long> >)' being compiled
| |