//===----------------------------------------------------------------------===// // // 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_const #include #include "test_macros.h" template void test_is_const() { static_assert(!std::is_const::value, ""); static_assert( std::is_const::value, ""); static_assert(!std::is_const::value, ""); static_assert( std::is_const::value, ""); #if TEST_STD_VER > 14 static_assert(!std::is_const_v, ""); static_assert( std::is_const_v, ""); static_assert(!std::is_const_v, ""); static_assert( std::is_const_v, ""); #endif } struct A; // incomplete int main() { test_is_const(); test_is_const(); test_is_const(); test_is_const(); test_is_const(); test_is_const(); test_is_const(); test_is_const(); static_assert(!std::is_const::value, ""); static_assert(!std::is_const::value, ""); }