4684ddb6aa
- import libcxx - reduce targets to the one when compiled as a tools Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
29 lines
805 B
C++
29 lines
805 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// template<class E> class initializer_list;
|
|
|
|
// initializer_list();
|
|
|
|
#include <initializer_list>
|
|
#include <cassert>
|
|
|
|
struct A {};
|
|
|
|
int main()
|
|
{
|
|
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
std::initializer_list<A> il;
|
|
assert(il.size() == 0);
|
|
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
|
#if _LIBCPP_STD_VER > 11
|
|
constexpr std::initializer_list<A> il2;
|
|
static_assert(il2.size() == 0, "");
|
|
#endif // _LIBCPP_STD_VER > 11
|
|
}
|