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 // UNSUPPORTED: c++98, c++03, c++11, c++14 11 12 // <type_traits> 13 14 // template <class T> struct is_aggregate; 15 // template <class T> constexpr bool is_aggregate_v = is_aggregate<T>::value; 16 17 #include <type_traits> 18 19 int main () 20 { 21 #ifdef _LIBCPP_HAS_NO_IS_AGGREGATE 22 // This should not compile when _LIBCPP_HAS_NO_IS_AGGREGATE is defined. 23 bool b = __is_aggregate(void); 24 ((void)b); 25 #else 26 #error Forcing failure... 27 #endif 28 } 29