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 // template<class E> 11 // class initializer_list 12 // { 13 // public: 14 // typedef E value_type; 15 // typedef const E& reference; 16 // typedef const E& const_reference; 17 // typedef size_t size_type; 18 // 19 // typedef const E* iterator; 20 // typedef const E* const_iterator; 21 22 #include <initializer_list> 23 #include <type_traits> 24 25 struct A {}; 26 27 int main() 28 { 29 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS 30 static_assert((std::is_same<std::initializer_list<A>::value_type, A>::value), ""); 31 static_assert((std::is_same<std::initializer_list<A>::reference, const A&>::value), ""); 32 static_assert((std::is_same<std::initializer_list<A>::const_reference, const A&>::value), ""); 33 static_assert((std::is_same<std::initializer_list<A>::size_type, std::size_t>::value), ""); 34 static_assert((std::is_same<std::initializer_list<A>::iterator, const A*>::value), ""); 35 static_assert((std::is_same<std::initializer_list<A>::const_iterator, const A*>::value), ""); 36 #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS 37 } 38