This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofCD1 status.
Section: 16.4.5.8[res.on.functions]Status:CD1Submitter: Nicola MusattiOpened: 2006-11-13Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [res.on.functions].
View all issues withCD1 status.
Discussion:
In the latest available draft standard (N2134)§ 17.4.3.6 [res.on.functions] states:
-1- In certain cases (replacement functions, handler functions, operations ontypes used to instantiate standard library template components), the C++Standard Library depends on components supplied by a C++ program. If thesecomponents do not meet their requirements, the Standard places no requirementson the implementation.
-2- In particular, the effects are undefined in the following cases:
[...]
- if an incomplete type (3.9) is used as a template argument wheninstantiating a template component.
This is contradicted by § 20.6.6.2/2 [util.smartptr.shared] whichstates:
[...]
The template parameter
Tofshared_ptrmay be an incomplete type.
Proposed resolution:
Modify the last bullet of § 17.4.3.6/2 [res.on.functions] to allow forexceptions:
- if an incomplete type (3.9) is used as a template argument wheninstantiating a template component, unless specifically allowed for thecomponent.