[libcxx][ranges] adds concept sized_range and cleans up ranges::size

* adds `sized_range` and conformance tests
* moves `disable_sized_range` into namespace `std::ranges`
* removes explicit type parameter

Implements part of P0896 'The One Ranges Proposal'.

Differential Revision: https://reviews.llvm.org/D102434
This commit is contained in:
Christopher Di Bella 2021-05-13 19:34:06 +00:00
parent 9acabe8b6f
commit d8fad66149
43 changed files with 188 additions and 25 deletions

View File

@ -39,7 +39,7 @@ bidirectional_iterator: `D100278 <https://llvm.org/D100278>`_",
[range.access],"ranges::begin, end, cbegin, cend, rbegin, rend, crbegin, and crend",[iterator.concepts],Christopher Di Bella,`D100255 <https://llvm.org/D100255>`_,
[ranges.primitives],"size, empty, data, and cdata",[iterator.concepts],Zoe Carver,,
[range.range],,[range.access],,,
[range.sized],"ranges::sized_range","[range.primitives], [range.range]",Christopher Di Bella,"`D102434 <https://llvm.org/D102434>`_",
[range.sized],"ranges::sized_range","[range.primitives], [range.range]",Christopher Di Bella,"`D102434 <https://llvm.org/D102434>`_",
[range.view],View and enable_view,[range.range],Louis Dionne,https://reviews.llvm.org/D101547,
[range.refinements],"OutputRange, InputRange, ForwardRange, BidirectionalRange, RandomAccessRange, ContiguousRange, CommonRange, ViewableRange","[ranges.syn]: pt. 2, [range.range]",Christopher Di Bella,"input_range: `D100271 <https://llvm.org/D100271>`_
forward_range: `D100275 <https://llvm.org/D100275>`_

1 Section Description Dependencies Assignee Patch Complete
39 [range.view] View and enable_view [range.range] Louis Dionne https://reviews.llvm.org/D101547
40 [range.refinements] OutputRange, InputRange, ForwardRange, BidirectionalRange, RandomAccessRange, ContiguousRange, CommonRange, ViewableRange [ranges.syn]: pt. 2, [range.range] Christopher Di Bella input_range: `D100271 <https://llvm.org/D100271>`_ forward_range: `D100275 <https://llvm.org/D100275>`_ bidirectional_range: `D100278 <https://llvm.org/D100278>`_
41 [view.interface] [range.utility.helpers] and view_interface [ranges.syn]: pt. 2, [range.view], [range.iterator.operations.prev], [range.refinements] Zoe Carver `D101737 <https://llvm.org/D101737>`_
42 [range.subrange] [view.interface] Zoe Carver `D102006 <https://llvm.org/D102006>`_
43 [range.all] view::all [range.subrange], [range.view.ref] Zoe Carver `D102028 <https://llvm.org/D102028>`_
44 [range.view.ref] ref-view [view.interface] Zoe Carver `D102020 <https://llvm.org/D102020>`_
45 [range.filter] filter_view [range.all] Louis Dionne

View File

@ -6,10 +6,13 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP_RANGES_CONCEPTS_H
#define _LIBCPP_RANGES_CONCEPTS_H
#ifndef _LIBCPP___RANGES_CONCEPTS_H
#define _LIBCPP___RANGES_CONCEPTS_H
#include <__config>
#include <__iterator/concepts.h>
#include <__ranges/access.h>
#include <__ranges/size.h>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@ -50,6 +53,12 @@ namespace ranges {
template <range _Rp>
using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<_Rp> >;
// [range.sized]
template <class _Tp>
concept sized_range = range<_Tp> && requires(_Tp& __t) { ranges::size(__t); };
// `disable_sized_range` defined in `<__ranges/size.h>`
// [range.refinements], other range refinements
template <class _Tp>
concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp> >;
@ -60,12 +69,12 @@ namespace ranges {
template <class _Tp>
concept bidirectional_range = forward_range<_Tp> && bidirectional_iterator<iterator_t<_Tp> >;
template <class _Tp>
concept common_range = range<_Tp> && same_as<iterator_t<_Tp>, sentinel_t<_Tp> >;
template <class _Tp>
concept random_access_range =
bidirectional_range<_Tp> && random_access_iterator<iterator_t<_Tp> >;
template <class _Tp>
concept common_range = range<_Tp> && same_as<iterator_t<_Tp>, sentinel_t<_Tp> >;
} // namespace ranges
#endif // !defined(_LIBCPP_HAS_NO_RANGES)
@ -76,4 +85,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
#endif // _LIBCPP_RANGES_CONCEPTS_H
#endif // _LIBCPP___RANGES_CONCEPTS_H

View File

@ -26,11 +26,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if !defined(_LIBCPP_HAS_NO_RANGES)
// clang-format off
namespace ranges {
template<class>
inline constexpr bool disable_sized_range = false;
// clang-format off
namespace ranges {
// [range.prim.size]
namespace __size {
void size(auto&) = delete;
@ -89,8 +89,7 @@ namespace __size {
template<__difference _Tp>
[[nodiscard]] constexpr __integer_like auto operator()(_Tp&& __t) const
noexcept(noexcept(ranges::end(__t) - ranges::begin(__t))) {
return _VSTD::__to_unsigned_like<range_difference_t<remove_cvref_t<_Tp>>>(
ranges::end(__t) - ranges::begin(__t));
return _VSTD::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t));
}
};
} // end namespace __size

View File

@ -50,6 +50,13 @@ namespace std::ranges {
template<range R>
using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>;
// [range.sized]
template<class>
inline constexpr bool disable_sized_range = false;
template<class T>
concept sized_range = ...;
// [range.view], views
template<class T>
inline constexpr bool enable_view = ...;

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(!stdr::random_access_range<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(!stdr::random_access_range<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(!stdr::random_access_range<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(!stdr::random_access_range<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(!stdr::random_access_range<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(!stdr::random_access_range<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -26,6 +26,7 @@ static_assert(!stdr::random_access_range<range>);
static_assert(stdr::common_range<range>);
static_assert(stdr::input_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::bidirectional_range<range const>);
@ -33,3 +34,4 @@ static_assert(!stdr::random_access_range<range const>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::input_range<range>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -24,9 +24,10 @@ static_assert(!stdr::view<range>);
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
static_assert(stdr::common_range<range>);
static_assert(stdr::random_access_range<range>);
static_assert(stdr::sized_range<range>);
static_assert(!stdr::view<range const>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::random_access_range<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -24,8 +24,10 @@ static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
static_assert(stdr::common_range<range>);
static_assert(stdr::random_access_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::random_access_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::forward_range<range>);
static_assert(!stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(!stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::forward_range<range const>);
static_assert(!stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(!stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(!stdr::random_access_range<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(!stdr::random_access_range<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -24,8 +24,10 @@ static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
static_assert(stdr::common_range<range>);
static_assert(stdr::random_access_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::random_access_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -24,8 +24,10 @@ static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
static_assert(stdr::common_range<range>);
static_assert(stdr::random_access_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::random_access_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::forward_range<range>);
static_assert(!stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::forward_range<range const>);
static_assert(!stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::forward_range<range>);
static_assert(!stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::forward_range<range const>);
static_assert(!stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::forward_range<range>);
static_assert(!stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::forward_range<range const>);
static_assert(!stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -25,9 +25,11 @@ static_assert(stdr::common_range<range>);
static_assert(stdr::forward_range<range>);
static_assert(!stdr::bidirectional_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::forward_range<range const>);
static_assert(!stdr::bidirectional_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -24,8 +24,10 @@ static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
static_assert(stdr::common_range<range>);
static_assert(stdr::random_access_range<range>);
static_assert(!stdr::view<range>);
static_assert(stdr::sized_range<range>);
static_assert(std::same_as<stdr::iterator_t<range const>, range::iterator>);
static_assert(stdr::common_range<range const>);
static_assert(stdr::random_access_range<range const>);
static_assert(!stdr::view<range const>);
static_assert(stdr::sized_range<range const>);

View File

@ -24,18 +24,22 @@ static_assert(std::same_as<stdr::iterator_t<fs::directory_iterator>, fs::directo
static_assert(stdr::common_range<fs::directory_iterator>);
static_assert(stdr::input_range<fs::directory_iterator>);
static_assert(!stdr::view<fs::directory_iterator>);
static_assert(!stdr::sized_range<fs::directory_iterator>);
static_assert(std::same_as<stdr::iterator_t<fs::directory_iterator const>, fs::directory_iterator>);
static_assert(stdr::common_range<fs::directory_iterator const>);
static_assert(stdr::input_range<fs::directory_iterator const>);
static_assert(!stdr::view<fs::directory_iterator const>);
static_assert(!stdr::sized_range<fs::directory_iterator const>);
static_assert(std::same_as<stdr::iterator_t<fs::recursive_directory_iterator>, fs::recursive_directory_iterator>);
static_assert(stdr::common_range<fs::recursive_directory_iterator>);
static_assert(stdr::input_range<fs::recursive_directory_iterator>);
static_assert(!stdr::view<fs::recursive_directory_iterator>);
static_assert(!stdr::sized_range<fs::recursive_directory_iterator>);
static_assert(std::same_as<stdr::iterator_t<fs::recursive_directory_iterator const>, fs::recursive_directory_iterator>);
static_assert(stdr::common_range<fs::recursive_directory_iterator const>);
static_assert(stdr::input_range<fs::recursive_directory_iterator const>);
static_assert(!stdr::view<fs::recursive_directory_iterator const>);
static_assert(!stdr::sized_range<fs::recursive_directory_iterator const>);

View File

@ -24,9 +24,11 @@ static_assert(stdr::common_range<fs::path>);
static_assert(stdr::bidirectional_range<fs::path>);
static_assert(!stdr::view<fs::path>);
static_assert(!stdr::random_access_range<fs::path>);
static_assert(!stdr::sized_range<fs::path>);
static_assert(std::same_as<stdr::iterator_t<fs::path const>, fs::path::const_iterator>);
static_assert(stdr::common_range<fs::path const>);
static_assert(stdr::bidirectional_range<fs::path const>);
static_assert(!stdr::view<fs::path const>);
static_assert(!stdr::random_access_range<fs::path const>);
static_assert(!stdr::sized_range<fs::path const>);

View File

@ -129,8 +129,8 @@ struct DisabledSizeRangeWithBeginEnd {
constexpr size_t size() const { return 1; }
};
template<>
inline constexpr bool std::disable_sized_range<DisabledSizeRangeWithBeginEnd> = true;
template <>
inline constexpr bool std::ranges::disable_sized_range<DisabledSizeRangeWithBeginEnd> = true;
static_assert(!std::is_invocable_v<RangeSizeT, DisabledSizeRangeWithBeginEnd&>);
struct BeginEndAndEmpty {

View File

@ -177,8 +177,8 @@ struct SizeMemberDisabled {
size_t size() { return 42; }
};
template<>
inline constexpr bool std::disable_sized_range<SizeMemberDisabled> = true;
template <>
inline constexpr bool std::ranges::disable_sized_range<SizeMemberDisabled> = true;
struct ImproperlyDisabledMember {
size_t size() const { return 42; }
@ -186,22 +186,22 @@ struct ImproperlyDisabledMember {
// Intentionally disabling "const ConstSizeMemberDisabled". This doesn't disable anything
// because T is always uncvrefed before being checked.
template<>
inline constexpr bool std::disable_sized_range<const ImproperlyDisabledMember> = true;
template <>
inline constexpr bool std::ranges::disable_sized_range<const ImproperlyDisabledMember> = true;
struct SizeFunctionDisabled {
friend size_t size(SizeFunctionDisabled) { return 42; }
};
template<>
inline constexpr bool std::disable_sized_range<SizeFunctionDisabled> = true;
template <>
inline constexpr bool std::ranges::disable_sized_range<SizeFunctionDisabled> = true;
struct ImproperlyDisabledFunction {
friend size_t size(ImproperlyDisabledFunction const&) { return 42; }
};
template<>
inline constexpr bool std::disable_sized_range<const ImproperlyDisabledFunction> = true;
template <>
inline constexpr bool std::ranges::disable_sized_range<const ImproperlyDisabledFunction> = true;
static_assert( std::is_invocable_v<RangeSizeT, ImproperlyDisabledMember&>);
static_assert( std::is_invocable_v<RangeSizeT, const ImproperlyDisabledMember&>);
@ -266,8 +266,8 @@ struct DisabledSizeRangeWithBeginEnd {
constexpr size_t size() { return 1; }
};
template<>
inline constexpr bool std::disable_sized_range<DisabledSizeRangeWithBeginEnd> = true;
template <>
inline constexpr bool std::ranges::disable_sized_range<DisabledSizeRangeWithBeginEnd> = true;
struct SizeBeginAndEndMembers {
int buff[8];

View File

@ -0,0 +1,79 @@
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-no-concepts
// UNSUPPORTED: gcc-10
// template<class T>
// concept sized_range;
#include <ranges>
#include "test_iterators.h"
namespace stdr = std::ranges;
static_assert(stdr::sized_range<int[5]>);
static_assert(stdr::sized_range<int (&)[5]>);
static_assert(!stdr::sized_range<int (&)[]>);
static_assert(!stdr::sized_range<int[]>);
struct range_has_size {
bidirectional_iterator<int*> begin();
bidirectional_iterator<int*> end();
int size();
};
static_assert(stdr::sized_range<range_has_size>);
static_assert(!stdr::sized_range<range_has_size const>);
struct range_has_const_size {
bidirectional_iterator<int*> begin();
bidirectional_iterator<int*> end();
int size() const;
};
static_assert(stdr::sized_range<range_has_const_size>);
static_assert(!stdr::sized_range<range_has_const_size const>);
struct const_range_has_size {
bidirectional_iterator<int*> begin() const;
bidirectional_iterator<int*> end() const;
int size();
};
static_assert(stdr::sized_range<const_range_has_size>);
static_assert(stdr::range<const_range_has_size const>);
static_assert(!stdr::sized_range<const_range_has_size const>);
struct const_range_has_const_size {
bidirectional_iterator<int*> begin() const;
bidirectional_iterator<int*> end() const;
int size() const;
};
static_assert(stdr::sized_range<const_range_has_const_size>);
static_assert(stdr::sized_range<const_range_has_const_size const>);
struct sized_sentinel_range_has_size {
int* begin();
int* end();
};
static_assert(stdr::sized_range<sized_sentinel_range_has_size>);
static_assert(!stdr::sized_range<sized_sentinel_range_has_size const>);
struct const_sized_sentinel_range_has_size {
int* begin() const;
int* end() const;
};
static_assert(stdr::sized_range<const_sized_sentinel_range_has_size>);
static_assert(stdr::sized_range<const_sized_sentinel_range_has_size const>);
struct non_range_has_size {
int size() const;
};
static_assert(requires(non_range_has_size const x) { stdr::size(x); });
static_assert(!stdr::sized_range<non_range_has_size>);
static_assert(!stdr::sized_range<non_range_has_size const>);

View File

@ -0,0 +1,28 @@
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-no-concepts
// UNSUPPORTED: gcc-10
// template<class T>
// concept sized_range;
#include <ranges>
template <std::ranges::range R>
consteval bool check_subsumption() {
return false;
}
template <std::ranges::sized_range R>
consteval bool check_subsumption() {
return true;
}
static_assert(check_subsumption<int[5]>());

View File

@ -23,8 +23,10 @@ static_assert(std::same_as<stdr::iterator_t<std::cmatch>, std::cmatch::iterator>
static_assert(stdr::common_range<std::cmatch>);
static_assert(stdr::random_access_range<std::cmatch>);
static_assert(!stdr::view<std::cmatch>);
static_assert(stdr::sized_range<std::cmatch>);
static_assert(std::same_as<stdr::iterator_t<std::cmatch const>, std::cmatch::const_iterator>);
static_assert(stdr::common_range<std::cmatch const>);
static_assert(stdr::random_access_range<std::cmatch const>);
static_assert(!stdr::view<std::cmatch const>);
static_assert(stdr::sized_range<std::cmatch const>);

View File

@ -23,8 +23,10 @@ static_assert(std::same_as<stdr::iterator_t<std::string>, std::string::iterator>
static_assert(stdr::common_range<std::string>);
static_assert(stdr::random_access_range<std::string>);
static_assert(!stdr::view<std::string>);
static_assert(stdr::sized_range<std::string>);
static_assert(std::same_as<stdr::iterator_t<std::string const>, std::string::const_iterator>);
static_assert(stdr::common_range<std::string const>);
static_assert(stdr::random_access_range<std::string const>);
static_assert(!stdr::view<std::string const>);
static_assert(stdr::sized_range<std::string const>);

View File

@ -23,8 +23,10 @@ static_assert(std::same_as<stdr::iterator_t<std::string_view>, std::string_view:
static_assert(stdr::common_range<std::string_view>);
static_assert(stdr::random_access_range<std::string_view>);
static_assert(!stdr::view<std::string_view>);
static_assert(stdr::sized_range<std::string_view>);
static_assert(std::same_as<stdr::iterator_t<std::string_view const>, std::string_view::const_iterator>);
static_assert(stdr::common_range<std::string_view const>);
static_assert(stdr::random_access_range<std::string_view const>);
static_assert(!stdr::view<std::string_view const>);
static_assert(!stdr::view<std::string_view const>); // FIXME: string_view needs to be patched so this is true
static_assert(stdr::sized_range<std::string_view const>);