2020-11-25 01:08:02 +08:00
|
|
|
// -*- C++ -*-
|
|
|
|
//===--------------------------- ranges -----------------------------------===//
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
#define _LIBCPP_RANGES
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include <compare> // see [compare.syn]
|
|
|
|
#include <initializer_list> // see [initializer.list.syn]
|
|
|
|
#include <iterator> // see [iterator.synopsis]
|
|
|
|
|
|
|
|
namespace std::ranges {
|
2021-04-11 13:08:32 +08:00
|
|
|
inline namespace unspecified {
|
|
|
|
// [range.access], range access
|
|
|
|
inline constexpr unspecified begin = unspecified;
|
|
|
|
inline constexpr unspecified end = unspecified;
|
|
|
|
inline constexpr unspecified cbegin = unspecified;
|
|
|
|
inline constexpr unspecified cend = unspecified;
|
2021-04-23 00:29:02 +08:00
|
|
|
|
|
|
|
inline constexpr unspecified size = unspecified;
|
2021-04-24 02:23:22 +08:00
|
|
|
inline constexpr unspecified ssize = unspecified;
|
2021-04-11 13:08:32 +08:00
|
|
|
}
|
|
|
|
|
2020-11-25 01:08:02 +08:00
|
|
|
// [range.range], ranges
|
2021-04-12 01:40:30 +08:00
|
|
|
template<class T>
|
|
|
|
concept range = see below;
|
|
|
|
|
2020-11-25 01:08:02 +08:00
|
|
|
template<class T>
|
|
|
|
inline constexpr bool enable_borrowed_range = false;
|
2021-04-11 13:08:32 +08:00
|
|
|
|
|
|
|
template<class T>
|
|
|
|
using iterator_t = decltype(ranges::begin(declval<T&>()));
|
2021-04-12 01:40:30 +08:00
|
|
|
template<class T>
|
|
|
|
using iterator_t = decltype(ranges::begin(declval<T&>()));
|
|
|
|
template<range R>
|
|
|
|
using sentinel_t = decltype(ranges::end(declval<R&>()));
|
|
|
|
template<range R>
|
|
|
|
using range_difference_t = iter_difference_t<iterator_t<R>>;
|
|
|
|
template<range R>
|
|
|
|
using range_value_t = iter_value_t<iterator_t<R>>;
|
|
|
|
template<range R>
|
|
|
|
using range_reference_t = iter_reference_t<iterator_t<R>>;
|
|
|
|
template<range R>
|
|
|
|
using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>;
|
|
|
|
|
2021-04-29 03:22:11 +08:00
|
|
|
// [range.view], views
|
|
|
|
template<class T>
|
|
|
|
inline constexpr bool enable_view = ...;
|
|
|
|
|
|
|
|
struct view_base { };
|
|
|
|
|
|
|
|
template<class T>
|
|
|
|
concept view = ...;
|
|
|
|
|
2021-04-12 01:40:30 +08:00
|
|
|
// [range.refinements], other range refinements
|
2021-04-12 03:04:52 +08:00
|
|
|
template<class T>
|
|
|
|
concept input_range = see below;
|
|
|
|
|
2021-04-12 06:11:03 +08:00
|
|
|
template<class T>
|
|
|
|
concept forward_range = see below;
|
|
|
|
|
2021-04-12 09:16:45 +08:00
|
|
|
template<class T>
|
|
|
|
concept bidirectional_range = see below;
|
|
|
|
|
2021-04-12 01:40:30 +08:00
|
|
|
template <class _Tp>
|
|
|
|
concept common_range = see below;
|
2020-11-25 01:08:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <__config>
|
2021-04-11 13:08:32 +08:00
|
|
|
#include <__ranges/access.h>
|
2021-04-12 01:40:30 +08:00
|
|
|
#include <__ranges/concepts.h>
|
2021-04-24 03:34:22 +08:00
|
|
|
#include <__ranges/empty.h>
|
2020-11-25 01:08:02 +08:00
|
|
|
#include <__ranges/enable_borrowed_range.h>
|
2021-04-29 03:22:11 +08:00
|
|
|
#include <__ranges/view.h>
|
2021-04-23 00:29:02 +08:00
|
|
|
#include <__ranges/size.h>
|
2020-11-25 01:08:02 +08:00
|
|
|
#include <compare> // Required by the standard.
|
|
|
|
#include <initializer_list> // Required by the standard.
|
|
|
|
#include <iterator> // Required by the standard.
|
|
|
|
#include <type_traits>
|
|
|
|
#include <version>
|
|
|
|
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
|
|
#pragma GCC system_header
|
|
|
|
#endif
|
|
|
|
|
|
|
|
_LIBCPP_PUSH_MACROS
|
|
|
|
#include <__undef_macros>
|
|
|
|
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
|
|
|
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
|
|
|
|
|
|
|
|
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
|
|
|
|
|
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
|
|
|
|
_LIBCPP_POP_MACROS
|
|
|
|
|
|
|
|
#endif // _LIBCPP_RANGES
|