It is not. What you have found is why it cannot be implicitely cast.
[6.2.5/26] states:
Each unqualified type has several qualified versions of its type, corresponding to the combinations of one, two, or all three of the const, volatile, and restrict qualifiers.
The qualified or unqualified versions of a type are distinct types that belong to the same type category and have the same representation and alignment requirements.
(Note: each unqualified type. const int
is not unqualified but int
is unqualified.)
With footnote:
The same representation and alignment requirements are meant to imply interchangeability as arguments to functions, return values from functions, and members of unions.
This means reading it will work the same way and yield the same value.
[6.7.3/6] specifies UB only for modifications:
If an attempt is made to modify an object defined with a const-qualified type through use of an lvalue with non-const-qualified type, the behavior is undefined.