Path: blob/main/contrib/llvm-project/libcxx/include/__ranges/dangling.h
35236 views
// -*- C++ -*-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-exception6//7//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___RANGES_DANGLING_H10#define _LIBCPP___RANGES_DANGLING_H1112#include <__config>13#include <__ranges/access.h>14#include <__ranges/concepts.h>15#include <__type_traits/conditional.h>1617#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)18# pragma GCC system_header19#endif2021_LIBCPP_BEGIN_NAMESPACE_STD2223#if _LIBCPP_STD_VER >= 202425namespace ranges {26struct dangling {27dangling() = default;28_LIBCPP_HIDE_FROM_ABI constexpr dangling(auto&&...) noexcept {}29};3031template <range _Rp>32using borrowed_iterator_t = _If<borrowed_range<_Rp>, iterator_t<_Rp>, dangling>;3334// borrowed_subrange_t defined in <__ranges/subrange.h>35} // namespace ranges3637#endif // _LIBCPP_STD_VER >= 203839_LIBCPP_END_NAMESPACE_STD4041#endif // _LIBCPP___RANGES_DANGLING_H424344