[debug] Use poison instead of undef to set a killed dbg.assign address [NFC] (#119760)
[llvm-project.git] / libcxx / include / __cxx03 / __tuple / tuple_like_no_subrange.h
blobff095163363b1a96fb3b594a559dc0f7e2aa63cb
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 //===----------------------------------------------------------------------===//
9 #ifndef _LIBCPP___CXX03___TUPLE_TUPLE_LIKE_NO_SUBRANGE_H
10 #define _LIBCPP___CXX03___TUPLE_TUPLE_LIKE_NO_SUBRANGE_H
12 #include <__cxx03/__config>
13 #include <__cxx03/__fwd/array.h>
14 #include <__cxx03/__fwd/complex.h>
15 #include <__cxx03/__fwd/pair.h>
16 #include <__cxx03/__fwd/tuple.h>
17 #include <__cxx03/__tuple/tuple_size.h>
18 #include <__cxx03/__type_traits/remove_cvref.h>
19 #include <__cxx03/cstddef>
21 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
22 # pragma GCC system_header
23 #endif
25 _LIBCPP_BEGIN_NAMESPACE_STD
27 #if _LIBCPP_STD_VER >= 20
29 template <class _Tp>
30 inline constexpr bool __tuple_like_no_subrange_impl = false;
32 template <class... _Tp>
33 inline constexpr bool __tuple_like_no_subrange_impl<tuple<_Tp...>> = true;
35 template <class _T1, class _T2>
36 inline constexpr bool __tuple_like_no_subrange_impl<pair<_T1, _T2>> = true;
38 template <class _Tp, size_t _Size>
39 inline constexpr bool __tuple_like_no_subrange_impl<array<_Tp, _Size>> = true;
41 # if _LIBCPP_STD_VER >= 26
43 template <class _Tp>
44 inline constexpr bool __tuple_like_no_subrange_impl<complex<_Tp>> = true;
46 # endif
48 template <class _Tp>
49 concept __tuple_like_no_subrange = __tuple_like_no_subrange_impl<remove_cvref_t<_Tp>>;
51 // This is equivalent to the exposition-only type trait `pair-like`, except that it is false for specializations of
52 // `ranges::subrange`. This is more useful than the pair-like concept in the standard because every use of `pair-like`
53 // excludes `ranges::subrange`.
54 template <class _Tp>
55 concept __pair_like_no_subrange = __tuple_like_no_subrange<_Tp> && tuple_size<remove_cvref_t<_Tp>>::value == 2;
57 #endif // _LIBCPP_STD_VER >= 20
59 _LIBCPP_END_NAMESPACE_STD
61 #endif // _LIBCPP___CXX03___TUPLE_TUPLE_LIKE_NO_SUBRANGE_H