Undefined behavior with respect to const_cast is defined by the C ++ 11 standard §3.8 / 9 (§3.8 - "Object lifetime"):
" . Creating a new object in the storage location where the const object is located with static, streaming or automatic expiration dates or in the storage location in which such a const object is used is occupied before its service life has ended in undefined results.
and §7.1.6.1 / 4 (§7.1.6.1 - “cv-qualifiers”)
" Except that any member of the class declared mutable (7.1.1) can be modified, any attempt to change a const object during its lifetime (3.8) leads to undefined behavior.
In other words, you get UB if you modify the object initially const , otherwise 1 not.
const_cast itself const_cast not introduce UB.
In addition, in §5.2.11 / 7 there is a non-normative note in which, depending on the type, an entry through a pointer or a link obtained from a const_cast can be undefined.
This non-normative note is so dumb that it has its own non-normative footnote, which explains that " const_cast not limited to transformations that discard const -qualifier.".
However, with this clarification, I can not imagine a single case where the record can be clearly defined or does not depend on the type, i.e. I do not understand the meaning of this note. The other two answers here focus on the word “write” in this note and that it is necessary to get to UB-earth through § 3.8 / 9, yes. For me, a rather suspicious aspect is “depending on the type,” which seems to be a significant part of this post.
1) Except when UB rules about other events not related to t220 come into play, for example. nulling a pointer that is later dereferenced in a context other than typeid -expression.