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

611. Standard library templates and incomplete types

Section: [res.on.functions] Status: CD1 Submitter: Nicola Musatti Opened: 2006-11-13 Last modified: 2017-02-03

Priority: Not Prioritized

View all other issues in [res.on.functions].

View all issues with CD1 status.


In the latest available draft standard (N2134) § [res.on.functions] states:

-1- In certain cases (replacement functions, handler functions, operations on types used to instantiate standard library template components), the C++ Standard Library depends on components supplied by a C++ program. If these components do not meet their requirements, the Standard places no requirements on the implementation.

-2- In particular, the effects are undefined in the following cases:


This is contradicted by § [util.smartptr.shared] which states:


The template parameter T of shared_ptr may be an incomplete type.

Proposed resolution:

Modify the last bullet of § [res.on.functions] to allow for exceptions: