2020-11-25 01:08:02 +08:00
|
|
|
// -*- C++ -*-
|
2021-11-18 05:25:01 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2020-11-25 01:08:02 +08:00
|
|
|
//
|
|
|
|
// 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___RANGES_ENABLE_BORROWED_RANGE_H
|
|
|
|
#define _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
|
|
|
|
|
|
|
|
// These customization variables are used in <span> and <string_view>. The
|
|
|
|
// separate header is used to avoid including the entire <ranges> header in
|
|
|
|
// <span> and <string_view>.
|
|
|
|
|
|
|
|
#include <__config>
|
|
|
|
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
2022-02-02 09:16:40 +08:00
|
|
|
# pragma GCC system_header
|
2020-11-25 01:08:02 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
2022-03-12 23:46:57 +08:00
|
|
|
#if _LIBCPP_STD_VER > 17
|
2020-11-25 01:08:02 +08:00
|
|
|
|
[libc++] Guard much of std::ranges under _LIBCPP_HAS_NO_INCOMPLETE_RANGES.
The logic here is that we are disabling *only* things in `std::ranges::`.
Everything in `std::` is permitted, including `default_sentinel`, `contiguous_iterator`,
`common_iterator`, `projected`, `swappable`, and so on. Then, we include
anything from `std::ranges::` that is required in order to make those things
work: `ranges::swap`, `ranges::swap_ranges`, `input_range`, `ranges::begin`,
`ranges::iter_move`, and so on. But then that's all. Everything else (including
notably all of the "views" and the `std::views` namespace itself) is still
locked up behind `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`.
Differential Revision: https://reviews.llvm.org/D118736
2022-02-02 05:52:02 +08:00
|
|
|
namespace ranges {
|
2020-11-25 01:08:02 +08:00
|
|
|
|
|
|
|
// [range.range], ranges
|
|
|
|
|
|
|
|
template <class>
|
|
|
|
inline constexpr bool enable_borrowed_range = false;
|
|
|
|
|
|
|
|
} // namespace ranges
|
|
|
|
|
2022-03-12 23:46:57 +08:00
|
|
|
#endif // _LIBCPP_STD_VER > 17
|
2020-11-25 01:08:02 +08:00
|
|
|
|
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
|
|
|
|
#endif // _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
|