| 1 |
//===----------------------------------------------------------------------===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
// REQUIRES: std-at-least-c++26 |
| 10 |
|
| 11 |
// <type_traits> |
| 12 |
|
| 13 |
// is_trivial and is_trivial_v are deprecated in C++26 by P3247R2 |
| 14 |
|
| 15 |
#include <type_traits> |
| 16 |
|
| 17 |
static_assert(std::is_trivial<int>::value); |
| 18 |
// expected-warning@-1 {{'is_trivial<int>' is deprecated: Consider using is_trivially_copyable<T>::value && is_trivially_default_constructible<T>::value instead.}} |
| 19 |
static_assert(std::is_trivial_v<int>); |
| 20 |
// expected-warning@-1 {{'is_trivial_v<int>' is deprecated: Consider using is_trivially_copyable_v<T> && is_trivially_default_constructible_v<T> instead.}} |