xref: /llvm-project/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp (revision f4d7c186283b60afd0c0a1f386088caf8a5f265d)
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 // UNSUPPORTED: c++98, c++03
11 
12 // Doesn't pass due to use of is_trivially_* trait.
13 // XFAIL: gcc-4.9
14 
15 // <tuple>
16 
17 // template <class... Types> class tuple;
18 
19 // ~tuple();
20 
21 #include <tuple>
22 #include <string>
23 #include <cassert>
24 #include <type_traits>
25 
26 int main()
27 {
28   static_assert(std::is_trivially_destructible<
29       std::tuple<> >::value, "");
30   static_assert(std::is_trivially_destructible<
31       std::tuple<void*> >::value, "");
32   static_assert(std::is_trivially_destructible<
33       std::tuple<int, float> >::value, "");
34   static_assert(!std::is_trivially_destructible<
35       std::tuple<std::string> >::value, "");
36   static_assert(!std::is_trivially_destructible<
37       std::tuple<int, std::string> >::value, "");
38 }
39