Const functions don't seem to care if you dereference a member-pointer into a non-const reference. It's also possible to return non-const member-pointers. However it's not allowed to return a reference or an address of a data member that has a value type.
Why?
class Class
{
public:
unsigned int& value2(void) const
{
*m_ptr = 10;
return *m_ptr;
//Why?
}
unsigned int* value3(void) const
{
return m_ptr; //Why?
}
private:
unsigned int* m_ptr;
};