Здравствуйте, IROV.., Вы писали:
IRO>Здравствуйте, landerhigh, Вы писали:
IRO>int main()
IRO>{
IRO> std::vector<MyClass *> v;
IRO> struct UpdateUntil
IRO> {
IRO> bool operator () ( MyClass * _my )
IRO> {
IRO> return _my->update();
IRO> }
IRO> };
IRO> std::find_if( v.begin(), v.end(), UpdateUntil() );
IRO>}
IRO>[/ccode]
Небольшая придирка
Использование структуры UpdateUntil в качестве параметра шаблона, на сегодняшний день, незаконно:
14.3.1 / 2
A local type, a type with no linkage, an unnamed type or a type compounded from any of these types shall
not be used as a template-argument for a template type-parameter.