Topic: Exception in c'tor of dynamically alloc
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/05/11 Raw View
In article r7n@ritz.cec.wustl.edu, jaf3@ritz.cec.wustl.edu (John Andrew Fingerhut) writes:
>In [expr.new]
>
>18If the constructor throws an exception and the new-expression contains
> a new-placement, a name lookup is performed on the name of operator
> delete in the scope of this new-expression. If the lookup succeeds
> and exactly one of the declarations found matches the declaration of
> that placement operator new, then the matching placement operator
> delete shall be called (_basic.stc.dynamic.deallocation_).
>
>I don't see an "otherwise" in this section. Should the standard specify
>here that no deallocation function is called when the lookup fails?
No. It is implicit in the definition. (What function could be called if
there is no function to call?)
---
Steve Clamage, stephen.clamage@eng.sun.com