This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

745. copy_exception API slices.

Section: 17.9.7 [propagation] Status: NAD Submitter: Alisdair Meredith Opened: 2007-10-10 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [propagation].

View all issues with NAD status.

Discussion:

It could be I did not understand the design rationale, but I thought copy_exception would produce an exception_ptr to the most-derived (dynamic) type of the passed exception. Instead it slices, which appears to be less useful, and a likely source of FAQ questions in the future.

(Peter Dimov suggests NAD)

[ Bellevue: ]

How could this be implemented in a way that the dynamic type is cloned?

The feature is designed to create an exception_ptr from an object whose static type is identical to the dynamic type and thus there is no slicing involved.

Proposed resolution: