§[dcl.init.list] 8.5.4/2:
The template
std::initializer_list
is not predefined; if the header<initializer_list>
is not included prior to a use ofstd::initializer_list
— even an implicit use in which the type is not named (7.1.6.4) — the program is ill-formed.
Does that mean this program is ill-formed?
#include <vector>
int main() {
// uses vector::vector(initializer_list<T>, const Allocator&) constructor
std::vector<int> v = {1, 2, 3};
}