This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
initializer_list
supports incomplete classesSection: 17.10 [support.initlist] Status: New Submitter: David Krauss Opened: 2015-04-27 Last modified: 2015-05-05
Priority: 4
View other active issues in [support.initlist].
View all other issues in [support.initlist].
View all issues with New status.
Discussion:
The typical use-case of std::initializer_list<T>
is for a pass-by-value parameter of T
's constructor.
However, this contravenes 16.4.5.8 [res.on.functions]/2.5 because initializer_list
doesn't specifically allow
incomplete types (as do for example std::unique_ptr
(20.3.1 [unique.ptr]/5) and
std::enable_shared_from_this
(20.3.2.7 [util.smartptr.enab]/2)).
Proposed resolution: