GrzybSon said:
const char * m_device;
unsigned m_value;
What size is m_device type;
sizeof( char * )
»The presence of a const specifier in a
decl-specifier-seq declares an object of const-qualified
object type; such object is called a const object.«
That was a quotation from ISO/IEC 14882:2003(E), but it
seems somewhat inappropriate, since after
char c;
char * p = &c;
char const * q = &c;
it give different assertions about whether the object c
is const or not.
So I'd say that const forbids write-operations to the
object of const-qualified type /via the identifier being
declared/.
ISO/IEC 14882:2003(E) say something similar at another
place:
»The referent of a const-qualified expression shall not
be modified (through that expression)«
But this is also rather vague, since it obviously is not
meant to be applied to:
*( int * const )p = 181
What size is m_value type?
sizeof( unsigned )