dtor.pass.cpp 1003 B

1234567891011121314151617181920212223242526272829303132333435
  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. // UNSUPPORTED: c++98, c++03
  10. // <tuple>
  11. // template <class... Types> class tuple;
  12. // ~tuple();
  13. #include <tuple>
  14. #include <string>
  15. #include <cassert>
  16. #include <type_traits>
  17. int main()
  18. {
  19. static_assert(std::is_trivially_destructible<
  20. std::tuple<> >::value, "");
  21. static_assert(std::is_trivially_destructible<
  22. std::tuple<void*> >::value, "");
  23. static_assert(std::is_trivially_destructible<
  24. std::tuple<int, float> >::value, "");
  25. static_assert(!std::is_trivially_destructible<
  26. std::tuple<std::string> >::value, "");
  27. static_assert(!std::is_trivially_destructible<
  28. std::tuple<int, std::string> >::value, "");
  29. }