Я не понимаю эту ошибку C ++ - ошибка C2101: '&' на константе

Этот код предположительно работает с GCC - я пытаюсь заставить его работать с Visual Studio. Я не могу понять, действительно ли код неисправен или я что-то не делаю с портом.

1>c:\somepath\aaa.h(52): error C2101: '&' on constant
1>          c:\somepath\aaa.h(52): while compiling class template member function 'const blahblah::Message something::AClass<Type>::aMethod(void) const'
1>          with
1>          [
1>              Type=const lala::BClass&
1>          ]
1>          c:\somepath\bbb.h(79) : see reference to class template instantiation 'something:AClass<Type>' being compiled
1>          with
1>          [
1>              Type=const lala::BClass&
1>          ]
1>  MyApplication.cpp

Файлы

aaa.h:52          virtual const Type aMethod() const { return Type(); }

bbb.h:79          AClass<const BClass&> blahblahblah_;
5
задан Drahakar 17 September 2011 в 23:42
поделиться