//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // type_traits // is_empty #include template void test_is_empty() { static_assert( std::is_empty::value, ""); static_assert( std::is_empty::value, ""); static_assert( std::is_empty::value, ""); static_assert( std::is_empty::value, ""); } template void test_is_not_empty() { static_assert(!std::is_empty::value, ""); static_assert(!std::is_empty::value, ""); static_assert(!std::is_empty::value, ""); static_assert(!std::is_empty::value, ""); } class Empty { }; class NotEmpty { virtual ~NotEmpty(); }; union Union {}; struct bit_zero { int : 0; }; int main() { test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_not_empty(); test_is_empty(); test_is_empty(); }