3
Terms and definitions
[intro.defs]
3.18
[defns.dynamic.type]
dynamic type
⟨glvalue⟩ type of the most derived object to which the glvalue refers
[
Example
1
:
If a pointer (
[dcl.
ptr]
)
p
whose static type is “pointer to class
B
” is pointing to an object of class
D
, derived from
B
(
[class.
derived]
), the dynamic type of the expression
*
p
is “
D
”
.
References (
[dcl.
ref]
) are treated similarly
.
—
end example
]