tuple_array_template_depth.pass.cpp 920 B

12345678910111213141516171819202122232425262728293031323334
  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. // template <class Tuple, __tuple_assignable<Tuple, tuple> >
  13. // tuple & operator=(Tuple &&);
  14. // This test checks that we do not evaluate __make_tuple_types
  15. // on the array when it doesn't match the size of the tuple.
  16. #include <array>
  17. #include <tuple>
  18. // Use 1256 to try and blow the template instantiation depth for all compilers.
  19. typedef std::array<char, 1256> array_t;
  20. typedef std::tuple<array_t> tuple_t;
  21. int main()
  22. {
  23. array_t arr;
  24. tuple_t tup;
  25. tup = arr;
  26. }