is_trivial.pass.cpp revision 6063ec176d5056683d6ddd310c2e3a8f1c7e1b46
1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// type_traits
11
12// is_trivial
13
14#include <type_traits>
15
16struct A {};
17
18class B
19{
20public:
21    B();
22};
23
24int main()
25{
26    static_assert( std::is_trivial<int>::value, "");
27    static_assert(!std::is_trivial<int&>::value, "");
28    static_assert(!std::is_trivial<volatile int&>::value, "");
29    static_assert( std::is_trivial<A>::value, "");
30    static_assert(!std::is_trivial<B>::value, "");
31}
32