This doesn''t make any sense to me.
I have this:
class core_c
{
public:
renderer_c* rendererPointer() const;
private:
renderer_c _Renderer;
};
renderer_c* core_c :: rendererPointer() const
{
return &_Renderer;
}
This is spitten out when I try to compile it with VC++.NET:
error C2440: ''return'' : cannot convert from ''const renderer_c *'' to ''renderer_c *'' Conversion loses qualifiers
Why is this? Taking away the const keyword is not only bad design, but it means that I have to convert more const-methods to non-consts one.