1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 #include <type_traits>
16 #if _LIBCPP_STD_VER > 11
25 static_assert( std::is_final<T>::value, "");
26 static_assert( std::is_final<const T>::value, "");
27 static_assert( std::is_final<volatile T>::value, "");
28 static_assert( std::is_final<const volatile T>::value, "");
32 void test_is_not_final()
34 static_assert(!std::is_final<T>::value, "");
35 static_assert(!std::is_final<const T>::value, "");
36 static_assert(!std::is_final<volatile T>::value, "");
37 static_assert(!std::is_final<const volatile T>::value, "");
42 test_is_not_final<int>();
43 test_is_not_final<int*>();
45 test_is_not_final<P*>();
46 test_is_not_final<U1>();
47 test_is_not_final<U1*>();
49 test_is_not_final<U2*>();