Im getting a weird error message. I have no idea what it means. I guess it has problems with constness.
What Im trying to do:
void CVector3f::someFunc(list<const CVector3f *const>& point_list){
bool a = point_list.empty();
.....
}
The error message:
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ext/new_allocator.h: In instantiation of 'class __gnu_cxx::new_allocator<const CVector3f* const>':
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/mingw32/bits/c++allocator.h:34:0,
from c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/allocator.h:48,
from c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/list:62,
from 01_SourceFiles/mathea.h:5,
from 01_SourceFiles/MathEA.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/allocator.h:89:11: required from 'class std::allocator<const CVector3f* const>'
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_list.h:307:9: required from 'class std::_List_base<const CVector3f* const, std::allocator<const CVector3f* const> >'
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/bits/stl_list.h:458:11: required from 'class std::list<const CVector3f* const>'
01_SourceFiles/MathEA.cpp:2573:24: required from here
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ext/new_allocator.h:83:7: error: 'const _Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::const_reference) const [with _Tp = const CVector3f* const; __gnu_cxx::new_allocator<_Tp>::const_pointer = const CVector3f* const*; __gnu_cxx::new_allocator<_Tp>::const_reference = const CVector3f* const&]' cannot be overloaded
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/include/c++/ext/new_allocator.h:79:7: error: with '_Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::reference) const [with _Tp = const CVector3f* const; __gnu_cxx::new_allocator<_Tp>::pointer = const CVector3f* const*; __gnu_cxx::new_allocator<_Tp>::reference = const CVector3f* const&]'
make[2]: *** [build/Debug/MinGW-Windows/01_SourceFiles/MathEA.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
Help pls! Thanks!