Annex F (informative)
Core undefined behavior
[ub]
F.3
[expr]
: Expressions
[ub.expr]
F.3.27
[ub:expr.mptr.oper.member.func.null]
Specified in:
[expr.
mptr.
oper]
1
#
If the second operand in a
.
*
expression is the null member pointer value (
[conv.
mem]
), the behavior is undefined
.
2
#
[
Example
1
:
struct
S
{
int
f
(
)
;
}
;
void
f
(
)
{
S cs;
int
(
S
::
*
pm
)
(
)
=
nullptr
;
(
cs
.
*
pm
)
(
)
;
// undefined behavior, the second operand is null
}
—
end example
]