Annex F (informative)
Core undefined behavior
[ub]
F.2
[basic]
: Basics
[ub.basic]
F.2.9
[ub:lifetime.outside.glvalue.member]
Specified in:
[basic.
life]
1
#
Behavior is undefined if a glvalue referring to an object outside of its lifetime is used to call a non-static member function of the object
.
2
#
[
Example
1
:
struct
A
{
void
f
(
)
{
}
}
;
void
f
(
)
{
A a; a
.
~
A
(
)
; a
.
f
(
)
;
// undefined behavior, glvalue used to access a non-static member
// function after the lifetime has ended
}
—
end example
]