Annex F (informative)
Core undefined behavior
[ub]
F.2
[basic]
: Basics
[ub.basic]
F.2.16
[ub:basic.stc.alloc.dealloc.throw]
Specified in:
[basic.
stc.
dynamic.
deallocation]
1
#
If a call to a deallocation function terminates by throwing an exception the behavior is undefined
.
2
#
[
Example
1
:
struct
X
{
void
operator
delete
(
void
*
)
noexcept
(
false
)
{
throw
"oops"
;
}
}
;
void
f
(
)
{
X
*
x
=
new
X
(
)
;
delete
x;
// undefined behavior
}
—
end example
]