Skip to content

Commit 8743f8c

Browse files
author
Ben Craig
committed
Include initializer_list from utility
The C++11 and C++14 standards both say in the header <utility> synopsis that <utility> shall include <initializer_list>. llvm-svn: 266808
1 parent 1d9de10 commit 8743f8c

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

libcxx/include/utility

+1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ template<class T, class U=T>
178178
#include <__config>
179179
#include <__tuple>
180180
#include <type_traits>
181+
#include <initializer_list>
181182

182183
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
183184
#pragma GCC system_header
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// The LLVM Compiler Infrastructure
4+
//
5+
// This file is dual licensed under the MIT and the University of Illinois Open
6+
// Source Licenses. See LICENSE.TXT for details.
7+
//
8+
//===----------------------------------------------------------------------===//
9+
10+
// <utility>
11+
12+
// #include <initializer_list>
13+
14+
#include <utility>
15+
16+
int main()
17+
{
18+
std::initializer_list<int> x;
19+
}
20+

0 commit comments

Comments
 (0)