Path: blob/main/contrib/llvm-project/libcxx/include/__tuple/tuple_like.h
35233 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef _LIBCPP___TUPLE_TUPLE_LIKE_H9#define _LIBCPP___TUPLE_TUPLE_LIKE_H1011#include <__config>12#include <__fwd/subrange.h>13#include <__tuple/tuple_like_no_subrange.h>14#include <__tuple/tuple_size.h>15#include <__type_traits/remove_cvref.h>1617#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)18# pragma GCC system_header19#endif2021_LIBCPP_BEGIN_NAMESPACE_STD2223#if _LIBCPP_STD_VER >= 202425template <class _Tp>26inline constexpr bool __is_ranges_subrange_v = false;2728template <class _Iter, class _Sent, ranges::subrange_kind _Kind>29inline constexpr bool __is_ranges_subrange_v<ranges::subrange<_Iter, _Sent, _Kind>> = true;3031template <class _Tp>32concept __tuple_like = __tuple_like_no_subrange<_Tp> || __is_ranges_subrange_v<remove_cvref_t<_Tp>>;3334// As of writing this comment every use of `pair-like` in the standard excludes `ranges::subrange`, so35// you most likely want to use `__pair_like_no_subrange` if you're looking for `pair-like`.3637#endif // _LIBCPP_STD_VER >= 203839_LIBCPP_END_NAMESPACE_STD4041#endif // _LIBCPP___TUPLE_TUPLE_LIKE_H424344