[rtsan] Remove mkfifoat interceptor (#116997)
[llvm-project.git] / libcxx / include / __tuple / tuple_like.h
blobc080a3dcf1e258a29d3b4a7c9293b12ca1642da3
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___TUPLE_TUPLE_LIKE_H
10 #define _LIBCPP___TUPLE_TUPLE_LIKE_H
12 #include <__config>
13 #include <__fwd/subrange.h>
14 #include <__tuple/tuple_like_no_subrange.h>
15 #include <__tuple/tuple_size.h>
16 #include <__type_traits/remove_cvref.h>
18 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19 # pragma GCC system_header
20 #endif
22 _LIBCPP_BEGIN_NAMESPACE_STD
24 #if _LIBCPP_STD_VER >= 20
26 template <class _Tp>
27 inline constexpr bool __is_ranges_subrange_v = false;
29 template <class _Iter, class _Sent, ranges::subrange_kind _Kind>
30 inline constexpr bool __is_ranges_subrange_v<ranges::subrange<_Iter, _Sent, _Kind>> = true;
32 template <class _Tp>
33 concept __tuple_like = __tuple_like_no_subrange<_Tp> || __is_ranges_subrange_v<remove_cvref_t<_Tp>>;
35 // As of writing this comment every use of `pair-like` in the standard excludes `ranges::subrange`, so
36 // you most likely want to use `__pair_like_no_subrange` if you're looking for `pair-like`.
38 #endif // _LIBCPP_STD_VER >= 20
40 _LIBCPP_END_NAMESPACE_STD
42 #endif // _LIBCPP___TUPLE_TUPLE_LIKE_H