| 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 | // <tuple> |
| 10 | |
| 11 | // template <class... Types> class tuple; |
| 12 | |
| 13 | // template<class... TTypes, class... UTypes> |
| 14 | // auto |
| 15 | // operator<=>(const tuple<TTypes...>& t, const tuple<UTypes...>& u); |
| 16 | |
| 17 | // UNSUPPORTED: c++03, c++11, c++14, c++17 |
| 18 | |
| 19 | #include <tuple> |
| 20 | |
| 21 | template <class T, class U> |
| 22 | concept can_compare = requires(T t, U u) { t <=> u; }; |
| 23 | |
| 24 | typedef std::tuple<int> T1; |
| 25 | typedef std::tuple<int, long> T2; |
| 26 | |
| 27 | static_assert(!can_compare<T1, T2>); |
| 28 | static_assert(!can_compare<T2, T1>); |
| 29 | |