2599. Library incomplete type permission phrase is unclear

Section: 22.2.6 [declval], 20.3.1 [unique.ptr], [unique.ptr.dltr.general], [util.smartptr.shared], [util.smartptr.weak], [util.smartptr.enab] Status: New Submitter: Zhihao Yuan Opened: 2016-03-08 Last modified: 2016-04-16 04:21:53 UTC

Priority: 3

View other active issues in [declval].

View all other issues in [declval].

View all issues with New status.


Currently the phrase to grant this permission is:

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

Two problems:

  1. The timing is unclear. We always allow specializations like LibraryTemplate<Incomp>* p;

  2. To the users of a template, the correct terminology should be "argument" rather than "parameter".

Suggested resolution:

In an instantiation of LibraryTemplate, an incomplete type may be used as the template argument for the template parameter T.

as shown here.

Or, to copy N4510's wording:

An incomplete type T may be used when instantiating LibraryTemplate.

Proposed resolution: