//===----------------------------------------------------------------------===// // // 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_final #include #if _LIBCPP_STD_VER > 11 struct P final { }; union U1 { }; union U2 final { }; template void test_is_final() { static_assert( std::is_final::value, ""); static_assert( std::is_final::value, ""); static_assert( std::is_final::value, ""); static_assert( std::is_final::value, ""); } template void test_is_not_final() { static_assert(!std::is_final::value, ""); static_assert(!std::is_final::value, ""); static_assert(!std::is_final::value, ""); static_assert(!std::is_final::value, ""); } int main () { test_is_not_final(); test_is_not_final(); test_is_final

(); test_is_not_final(); test_is_not_final(); test_is_not_final(); test_is_final (); test_is_not_final(); } #else int main () {} #endif