| 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 | |
| 9 | // UNSUPPORTED: c++03 |
| 10 | |
| 11 | // <tuple> |
| 12 | |
| 13 | // template <class... Types> |
| 14 | // class tuple_size<tuple<Types...>> |
| 15 | // : public integral_constant<size_t, sizeof...(Types)> { }; |
| 16 | |
| 17 | // Expect failures with a reference type, pointer type, and a non-tuple type. |
| 18 | |
| 19 | #include <tuple> |
| 20 | |
| 21 | void f() { |
| 22 | (void)std::tuple_size<std::tuple<> &>::value; // expected-error {{implicit instantiation of undefined template}} |
| 23 | (void)std::tuple_size<int>::value; // expected-error {{implicit instantiation of undefined template}} |
| 24 | (void)std::tuple_size<std::tuple<>*>::value; // expected-error {{implicit instantiation of undefined template}} |
| 25 | } |
| 26 | |