tuple_array_template_depth.pass.cpp 1007 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. // UNSUPPORTED: c++98, c++03
  9. // <tuple>
  10. // template <class... Types> class tuple;
  11. // template <class Tuple, __tuple_convertible<Tuple, tuple> >
  12. // tuple(Tuple &&);
  13. //
  14. // template <class Tuple, __tuple_constructible<Tuple, tuple> >
  15. // tuple(Tuple &&);
  16. // This test checks that we do not evaluate __make_tuple_types
  17. // on the array.
  18. #include <array>
  19. #include <tuple>
  20. #include "test_macros.h"
  21. // Use 1256 to try and blow the template instantiation depth for all compilers.
  22. typedef std::array<char, 1256> array_t;
  23. typedef std::tuple<array_t> tuple_t;
  24. int main(int, char**)
  25. {
  26. array_t arr;
  27. tuple_t tup(arr);
  28. return 0;
  29. }