Specify exception semantics for UPC++ functions that construct or destruct arbitrary objects (i.e. of template-parameter type T)
Issue #83
resolved
We should catch the exception, deallocate the memory (without calling any destructor), and then rethrow the exception. These functions should also be explicitly marked as potentially throwing (i.e. not noexcept
).
Comments (5)
-
reporter -
reporter - changed title to Specify exception semantics for UPC++ functions that construct or destruct arbitrary objects (i.e. of template-parameter type T)
-
- changed component to Distributed Objects
-
- changed milestone to 2017.09.30 release
-
reporter - changed status to resolved
Fixed in 23886c4.
- Log in to comment
Added exception details in for de/allocation functions in 103031f.
new_array()
should destruct previously initialized elements if an element's constructor throws an exception.We still need to specify exception semantics for any UPC++ function that may construct or destruct an arbitrary type. In particular, this includes the constructors and destructor for
dist_object<T>
.