//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // 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(int, char**) { 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, ""); return 0; }