| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > C/C++: Общие вопросы > Вложенный класс + STD + оперратор == |
| Автор: SeregaLBN 24.7.2006, 11:03 | ||||
| Покажу на примере (пользуюсь VS6). Есть простой код - класс 'Запись' и класс векторов этих записей:
Всё отлично компилируется. А вот при попытке вложить класс CRecord внутрь CWrapper (т.к. у меня CRecord есть сущность только CWrapper'а) и происходят ошибки. Подскажите что и как тут переделать... Насколько я понимаю, траблы в операторе ==, но вот как исправить... Переделанный код:
А ошибки следующие: error C2784: 'bool __cdecl std::operator ==(const class std::istream_iterator<_U,_E,_Tr> &,const class std::istream_iterator<_U,_E,_Tr> &)' : could not deduce template argument for 'const class std::istream_iterator<_U,_E,_Tr> &' from 'const struct CWrapper::CRecord' see reference to function template instantiation 'const struct CWrapper::CRecord *__cdecl std::find(const struct CWrapper::CRecord *,const struct CWrapper::CRecord *,const struct CWrapper::CRecord &)' being compiled error C2784: 'bool __cdecl std::operator ==(const class std::reverse_bidirectional_iterator<_BI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_bidirectional_iterator<_BI,_Ty,_Rt,_Pt,_D> &)' : could not deduce template argument for 'const class std::reverse_bidirectional_iterator<_BI,_Ty,_Rt,_Pt,_D> &' from 'const struct CWrapper::CRecord' see reference to function template instantiation 'const struct CWrapper::CRecord *__cdecl std::find(const struct CWrapper::CRecord *,const struct CWrapper::CRecord *,const struct CWrapper::CRecord &)' being compiled error C2784: 'bool __cdecl std::operator ==(const class std::vector<_Ty,_A> &,const class std::vector<_Ty,_A> &)' : could not deduce template argument for 'const class std::vector<_Ty,_A> &' from 'const struct CWrapper::CRecord' see reference to function template instantiation 'const struct CWrapper::CRecord *__cdecl std::find(const struct CWrapper::CRecord *,const struct CWrapper::CRecord *,const struct CWrapper::CRecord &)' being compiled |
| Автор: SeregaLBN 24.7.2006, 12:41 | ||
Разобрался. Тема закрыта
|