Title
initializer_list supports incomplete classes
Status
new
Section
[support.initlist]
Submitter
David Krauss

Created on 2015-04-27.00:00:00 last changed 117 months ago

Messages

Date: 2015-05-03.08:59:55

The typical use-case of std::initializer_list<T> is for a pass-by-value parameter of T's constructor. However, this contravenes [res.on.functions]/2.5 because initializer_list doesn't specifically allow incomplete types (as do for example std::unique_ptr ([unique.ptr]/5) and std::enable_shared_from_this ([util.smartptr.enab]/2)).

A resolution would be to copy-paste the relevant text from such a paragraph.

History
Date User Action Args
2015-04-27 00:00:00admincreate