mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
5660ec4741
This release is an atomic upgrade to GCC 14.1.0 with C23 and C++23
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP___TUPLE_TUPLE_LIKE_H
|
|
#define _LIBCPP___TUPLE_TUPLE_LIKE_H
|
|
|
|
#include <__config>
|
|
#include <__fwd/subrange.h>
|
|
#include <__tuple/tuple_like_no_subrange.h>
|
|
#include <__tuple/tuple_size.h>
|
|
#include <__type_traits/remove_cvref.h>
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
# pragma GCC system_header
|
|
#endif
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
#if _LIBCPP_STD_VER >= 20
|
|
|
|
template <class _Tp>
|
|
inline constexpr bool __is_ranges_subrange_v = false;
|
|
|
|
template <class _Iter, class _Sent, ranges::subrange_kind _Kind>
|
|
inline constexpr bool __is_ranges_subrange_v<ranges::subrange<_Iter, _Sent, _Kind>> = true;
|
|
|
|
template <class _Tp>
|
|
concept __tuple_like = __tuple_like_no_subrange<_Tp> || __is_ranges_subrange_v<remove_cvref_t<_Tp>>;
|
|
|
|
// As of writing this comment every use of `pair-like` in the standard excludes `ranges::subrange`, so
|
|
// you most likely want to use `__pair_like_no_subrange` if you're looking for `pair-like`.
|
|
|
|
#endif // _LIBCPP_STD_VER >= 20
|
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
#endif // _LIBCPP___TUPLE_TUPLE_LIKE_H
|