Annex F (informative)
Core undefined behavior
[ub]
F.2
[basic]
: Basics
[ub.basic]
F.2.8
[ub:lifetime.outside.glvalue.access]
Specified in:
[basic.
life]
1
#
Behavior is undefined if a glvalue referring to an object outside of its lifetime is used to access the object
.
2
#
[
Example
1
:
void
f
(
)
{
int
x
=
int
{
10
}
;
using
T
=
int
; x
.
~
T
(
)
;
int
y
=
x;
// undefined behavior, glvalue used to access the
// object after the lifetime has ended
}
—
end example
]