//===----------------------------------------------------------------------===// // // ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // type_traits // is_abstract #include template void test_is_abstract() { static_assert( std::is_abstract::value, ""); static_assert( std::is_abstract::value, ""); static_assert( std::is_abstract::value, ""); static_assert( std::is_abstract::value, ""); } template void test_is_not_abstract() { static_assert(!std::is_abstract::value, ""); static_assert(!std::is_abstract::value, ""); static_assert(!std::is_abstract::value, ""); static_assert(!std::is_abstract::value, ""); } class Empty { }; class NotEmpty { virtual ~NotEmpty(); }; union Union {}; struct bit_zero { int : 0; }; class Abstract { virtual ~Abstract() = 0; }; int main() { test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_not_abstract(); test_is_abstract(); }