forked from OSchip/llvm-project
[libc++][NFC] Replace uses of stdr:: by just std::ranges::
Differential Revision: https://reviews.llvm.org/D109121
This commit is contained in:
parent
1bc175d486
commit
9d7c420ad1
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::map<int, int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(!std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(!std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::multimap<int, int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(!std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(!std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,21 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::multiset<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_range<range>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(!std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(!std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,24 +18,24 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::set<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
static_assert(stdr::bidirectional_range<range>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(stdr::bidirectional_range<range const>);
|
||||
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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::input_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::input_range<range>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::array<int, 10>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<range>);
|
||||
static_assert(stdr::sized_range<range>);
|
||||
static_assert(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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::contiguous_range<range const>);
|
||||
static_assert(stdr::sized_range<range const>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::contiguous_range<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::contiguous_range<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::deque<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<range>);
|
||||
static_assert(!stdr::view<range>);
|
||||
static_assert(stdr::sized_range<range>);
|
||||
static_assert(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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::contiguous_range<range const>);
|
||||
static_assert(!stdr::view<range const>);
|
||||
static_assert(stdr::sized_range<range const>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::random_access_range<range>);
|
||||
static_assert(!std::ranges::contiguous_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::random_access_range<range const>);
|
||||
static_assert(!std::ranges::contiguous_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::forward_list<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::forward_range<range>);
|
||||
static_assert(!std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(!std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::forward_range<range const>);
|
||||
static_assert(!std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(!std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::list<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(!std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(!std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::vector<bool>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<range>);
|
||||
static_assert(!stdr::view<range>);
|
||||
static_assert(stdr::sized_range<range>);
|
||||
static_assert(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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::contiguous_range<range const>);
|
||||
static_assert(!stdr::view<range const>);
|
||||
static_assert(stdr::sized_range<range const>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::random_access_range<range>);
|
||||
static_assert(!std::ranges::contiguous_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::random_access_range<range const>);
|
||||
static_assert(!std::ranges::contiguous_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::vector<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<range>);
|
||||
static_assert(!stdr::view<range>);
|
||||
static_assert(stdr::sized_range<range>);
|
||||
static_assert(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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::contiguous_range<range const>);
|
||||
static_assert(!stdr::view<range const>);
|
||||
static_assert(stdr::sized_range<range const>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::contiguous_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::contiguous_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::unordered_map<int, int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::forward_range<range>);
|
||||
static_assert(!std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::forward_range<range const>);
|
||||
static_assert(!std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::unordered_multimap<int, int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::forward_range<range>);
|
||||
static_assert(!std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::forward_range<range const>);
|
||||
static_assert(!std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::unordered_multiset<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::forward_range<range>);
|
||||
static_assert(!std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::forward_range<range const>);
|
||||
static_assert(!std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::unordered_set<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<range>, range::iterator>);
|
||||
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(!stdr::borrowed_range<range>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<range const>);
|
||||
static_assert(!stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::forward_range<range>);
|
||||
static_assert(!std::ranges::bidirectional_range<range>);
|
||||
static_assert(!std::ranges::view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(!std::ranges::borrowed_range<range>);
|
||||
static_assert(!std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::forward_range<range const>);
|
||||
static_assert(!std::ranges::bidirectional_range<range const>);
|
||||
static_assert(!std::ranges::view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(!std::ranges::borrowed_range<range const>);
|
||||
static_assert(!std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
#include <ranges>
|
||||
|
||||
using range = std::span<int>;
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<range>);
|
||||
static_assert(stdr::view<range> && stdr::enable_view<range>);
|
||||
static_assert(stdr::sized_range<range>);
|
||||
static_assert(stdr::borrowed_range<range>);
|
||||
static_assert(stdr::viewable_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::contiguous_range<range const>);
|
||||
static_assert(!stdr::view<range const> && !stdr::enable_view<range const>);
|
||||
static_assert(stdr::sized_range<range const>);
|
||||
static_assert(stdr::borrowed_range<range const>);
|
||||
static_assert(stdr::viewable_range<range const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range>);
|
||||
static_assert(std::ranges::random_access_range<range>);
|
||||
static_assert(std::ranges::contiguous_range<range>);
|
||||
static_assert(std::ranges::view<range> && std::ranges::enable_view<range>);
|
||||
static_assert(std::ranges::sized_range<range>);
|
||||
static_assert(std::ranges::borrowed_range<range>);
|
||||
static_assert(std::ranges::viewable_range<range>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::iterator>);
|
||||
static_assert(std::ranges::common_range<range const>);
|
||||
static_assert(std::ranges::random_access_range<range const>);
|
||||
static_assert(std::ranges::contiguous_range<range const>);
|
||||
static_assert(!std::ranges::view<range const> && !std::ranges::enable_view<range const>);
|
||||
static_assert(std::ranges::sized_range<range const>);
|
||||
static_assert(std::ranges::borrowed_range<range const>);
|
||||
static_assert(std::ranges::viewable_range<range const>);
|
||||
|
|
|
@ -18,36 +18,36 @@
|
|||
#include <concepts>
|
||||
#include <ranges>
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<fs::directory_iterator>, fs::directory_iterator>);
|
||||
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(!stdr::borrowed_range<fs::directory_iterator>);
|
||||
static_assert(!stdr::viewable_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(!stdr::borrowed_range<fs::directory_iterator const>);
|
||||
static_assert(!stdr::viewable_range<fs::directory_iterator const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<fs::directory_iterator>, fs::directory_iterator>);
|
||||
static_assert(std::ranges::common_range<fs::directory_iterator>);
|
||||
static_assert(std::ranges::input_range<fs::directory_iterator>);
|
||||
static_assert(!std::ranges::view<fs::directory_iterator>);
|
||||
static_assert(!std::ranges::sized_range<fs::directory_iterator>);
|
||||
static_assert(!std::ranges::borrowed_range<fs::directory_iterator>);
|
||||
static_assert(!std::ranges::viewable_range<fs::directory_iterator>);
|
||||
|
||||
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(!stdr::borrowed_range<fs::recursive_directory_iterator>);
|
||||
static_assert(!stdr::viewable_range<fs::recursive_directory_iterator>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<fs::directory_iterator const>, fs::directory_iterator>);
|
||||
static_assert(std::ranges::common_range<fs::directory_iterator const>);
|
||||
static_assert(std::ranges::input_range<fs::directory_iterator const>);
|
||||
static_assert(!std::ranges::view<fs::directory_iterator const>);
|
||||
static_assert(!std::ranges::sized_range<fs::directory_iterator const>);
|
||||
static_assert(!std::ranges::borrowed_range<fs::directory_iterator const>);
|
||||
static_assert(!std::ranges::viewable_range<fs::directory_iterator const>);
|
||||
|
||||
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>);
|
||||
static_assert(!stdr::borrowed_range<fs::recursive_directory_iterator const>);
|
||||
static_assert(!stdr::viewable_range<fs::recursive_directory_iterator const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<fs::recursive_directory_iterator>, fs::recursive_directory_iterator>);
|
||||
static_assert(std::ranges::common_range<fs::recursive_directory_iterator>);
|
||||
static_assert(std::ranges::input_range<fs::recursive_directory_iterator>);
|
||||
static_assert(!std::ranges::view<fs::recursive_directory_iterator>);
|
||||
static_assert(!std::ranges::sized_range<fs::recursive_directory_iterator>);
|
||||
static_assert(!std::ranges::borrowed_range<fs::recursive_directory_iterator>);
|
||||
static_assert(!std::ranges::viewable_range<fs::recursive_directory_iterator>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<fs::recursive_directory_iterator const>, fs::recursive_directory_iterator>);
|
||||
static_assert(std::ranges::common_range<fs::recursive_directory_iterator const>);
|
||||
static_assert(std::ranges::input_range<fs::recursive_directory_iterator const>);
|
||||
static_assert(!std::ranges::view<fs::recursive_directory_iterator const>);
|
||||
static_assert(!std::ranges::sized_range<fs::recursive_directory_iterator const>);
|
||||
static_assert(!std::ranges::borrowed_range<fs::recursive_directory_iterator const>);
|
||||
static_assert(!std::ranges::viewable_range<fs::recursive_directory_iterator const>);
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
#include <concepts>
|
||||
#include <ranges>
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<fs::path>, fs::path::iterator>);
|
||||
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(!stdr::borrowed_range<fs::path>);
|
||||
static_assert(!stdr::viewable_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>);
|
||||
static_assert(!stdr::borrowed_range<fs::path const>);
|
||||
static_assert(!stdr::viewable_range<fs::path const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<fs::path>, fs::path::iterator>);
|
||||
static_assert(std::ranges::common_range<fs::path>);
|
||||
static_assert(std::ranges::bidirectional_range<fs::path>);
|
||||
static_assert(!std::ranges::view<fs::path>);
|
||||
static_assert(!std::ranges::random_access_range<fs::path>);
|
||||
static_assert(!std::ranges::sized_range<fs::path>);
|
||||
static_assert(!std::ranges::borrowed_range<fs::path>);
|
||||
static_assert(!std::ranges::viewable_range<fs::path>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<fs::path const>, fs::path::const_iterator>);
|
||||
static_assert(std::ranges::common_range<fs::path const>);
|
||||
static_assert(std::ranges::bidirectional_range<fs::path const>);
|
||||
static_assert(!std::ranges::view<fs::path const>);
|
||||
static_assert(!std::ranges::random_access_range<fs::path const>);
|
||||
static_assert(!std::ranges::sized_range<fs::path const>);
|
||||
static_assert(!std::ranges::borrowed_range<fs::path const>);
|
||||
static_assert(!std::ranges::viewable_range<fs::path const>);
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include "test_iterators.h"
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::range_difference_t<test_range<cpp20_input_iterator> >, std::iter_difference_t<int*> >);
|
||||
static_assert(std::same_as<stdr::range_value_t<test_range<cpp20_input_iterator> >, std::iter_value_t<int*> >);
|
||||
static_assert(std::same_as<stdr::range_reference_t<test_range<cpp20_input_iterator> >, std::iter_reference_t<int*> >);
|
||||
static_assert(std::same_as<stdr::range_rvalue_reference_t<test_range<cpp20_input_iterator> >, std::iter_rvalue_reference_t<int*> >);
|
||||
|
||||
static_assert(std::same_as<std::ranges::range_difference_t<test_range<cpp20_input_iterator> >, std::iter_difference_t<int*> >);
|
||||
static_assert(std::same_as<std::ranges::range_value_t<test_range<cpp20_input_iterator> >, std::iter_value_t<int*> >);
|
||||
static_assert(std::same_as<std::ranges::range_reference_t<test_range<cpp20_input_iterator> >, std::iter_reference_t<int*> >);
|
||||
static_assert(std::same_as<std::ranges::range_rvalue_reference_t<test_range<cpp20_input_iterator> >, std::iter_rvalue_reference_t<int*> >);
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<test_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<stdr::iterator_t<test_range<cpp17_input_iterator> const>, cpp17_input_iterator<int const*> >);
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<test_non_const_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<test_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<test_range<cpp17_input_iterator> const>, cpp17_input_iterator<int const*> >);
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<test_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<stdr::iterator_t<test_common_range<cpp17_input_iterator> const>, cpp17_input_iterator<int const*> >);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<test_non_const_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<test_non_const_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<test_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<test_common_range<cpp17_input_iterator> const>, cpp17_input_iterator<int const*> >);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<test_non_const_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
|
|
|
@ -19,30 +19,30 @@
|
|||
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(stdr::range<test_range<cpp20_input_iterator> >);
|
||||
|
||||
static_assert(std::ranges::range<test_range<cpp20_input_iterator> >);
|
||||
|
||||
struct incompatible_iterators {
|
||||
int* begin();
|
||||
long* end();
|
||||
};
|
||||
static_assert(!stdr::range<incompatible_iterators>);
|
||||
static_assert(!std::ranges::range<incompatible_iterators>);
|
||||
|
||||
struct int_begin_int_end {
|
||||
int begin();
|
||||
int end();
|
||||
};
|
||||
static_assert(!stdr::range<int_begin_int_end>);
|
||||
static_assert(!std::ranges::range<int_begin_int_end>);
|
||||
|
||||
struct iterator_begin_int_end {
|
||||
int* begin();
|
||||
int end();
|
||||
};
|
||||
static_assert(!stdr::range<iterator_begin_int_end>);
|
||||
static_assert(!std::ranges::range<iterator_begin_int_end>);
|
||||
|
||||
struct int_begin_iterator_end {
|
||||
int begin();
|
||||
int* end();
|
||||
};
|
||||
static_assert(!stdr::range<int_begin_iterator_end>);
|
||||
static_assert(!std::ranges::range<int_begin_iterator_end>);
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#include "test_iterators.h"
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::sentinel_t<test_range<cpp20_input_iterator> >, sentinel>);
|
||||
static_assert(std::same_as<stdr::sentinel_t<test_range<cpp20_input_iterator> const>, sentinel>);
|
||||
static_assert(std::same_as<stdr::sentinel_t<test_non_const_range<cpp20_input_iterator> >, sentinel>);
|
||||
static_assert(std::same_as<stdr::sentinel_t<test_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<stdr::sentinel_t<test_common_range<cpp17_input_iterator> const>, cpp17_input_iterator<int const*> >);
|
||||
static_assert(std::same_as<stdr::sentinel_t<test_non_const_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
|
||||
static_assert(std::same_as<std::ranges::sentinel_t<test_range<cpp20_input_iterator> >, sentinel>);
|
||||
static_assert(std::same_as<std::ranges::sentinel_t<test_range<cpp20_input_iterator> const>, sentinel>);
|
||||
static_assert(std::same_as<std::ranges::sentinel_t<test_non_const_range<cpp20_input_iterator> >, sentinel>);
|
||||
static_assert(std::same_as<std::ranges::sentinel_t<test_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
static_assert(std::same_as<std::ranges::sentinel_t<test_common_range<cpp17_input_iterator> const>, cpp17_input_iterator<int const*> >);
|
||||
static_assert(std::same_as<std::ranges::sentinel_t<test_non_const_common_range<cpp17_input_iterator> >, cpp17_input_iterator<int*> >);
|
||||
|
|
|
@ -17,18 +17,18 @@
|
|||
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
|
||||
template <template <class...> class I>
|
||||
constexpr bool check_bidirectional_range() {
|
||||
constexpr bool result = stdr::bidirectional_range<test_range<I> >;
|
||||
static_assert(stdr::bidirectional_range<test_range<I> const> == result);
|
||||
static_assert(stdr::bidirectional_range<test_non_const_common_range<I> > == result);
|
||||
static_assert(stdr::bidirectional_range<test_non_const_range<I> > == result);
|
||||
static_assert(stdr::bidirectional_range<test_common_range<I> > == result);
|
||||
static_assert(stdr::bidirectional_range<test_common_range<I> const> == result);
|
||||
static_assert(!stdr::bidirectional_range<test_non_const_common_range<I> const>);
|
||||
static_assert(!stdr::bidirectional_range<test_non_const_range<I> const>);
|
||||
constexpr bool result = std::ranges::bidirectional_range<test_range<I> >;
|
||||
static_assert(std::ranges::bidirectional_range<test_range<I> const> == result);
|
||||
static_assert(std::ranges::bidirectional_range<test_non_const_common_range<I> > == result);
|
||||
static_assert(std::ranges::bidirectional_range<test_non_const_range<I> > == result);
|
||||
static_assert(std::ranges::bidirectional_range<test_common_range<I> > == result);
|
||||
static_assert(std::ranges::bidirectional_range<test_common_range<I> const> == result);
|
||||
static_assert(!std::ranges::bidirectional_range<test_non_const_common_range<I> const>);
|
||||
static_assert(!std::ranges::bidirectional_range<test_non_const_range<I> const>);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,39 +18,39 @@
|
|||
#include "test_iterators.h"
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(!stdr::common_range<test_range<cpp17_input_iterator> >);
|
||||
static_assert(!stdr::common_range<test_range<cpp17_input_iterator> const>);
|
||||
|
||||
static_assert(!stdr::common_range<test_non_const_range<cpp17_input_iterator> >);
|
||||
static_assert(!stdr::common_range<test_non_const_range<cpp17_input_iterator> const>);
|
||||
static_assert(!std::ranges::common_range<test_range<cpp17_input_iterator> >);
|
||||
static_assert(!std::ranges::common_range<test_range<cpp17_input_iterator> const>);
|
||||
|
||||
static_assert(stdr::common_range<test_common_range<cpp17_input_iterator> >);
|
||||
static_assert(stdr::common_range<test_common_range<cpp17_input_iterator> const>);
|
||||
static_assert(!std::ranges::common_range<test_non_const_range<cpp17_input_iterator> >);
|
||||
static_assert(!std::ranges::common_range<test_non_const_range<cpp17_input_iterator> const>);
|
||||
|
||||
static_assert(stdr::common_range<test_non_const_common_range<cpp17_input_iterator> >);
|
||||
static_assert(!stdr::common_range<test_non_const_common_range<cpp17_input_iterator> const>);
|
||||
static_assert(std::ranges::common_range<test_common_range<cpp17_input_iterator> >);
|
||||
static_assert(std::ranges::common_range<test_common_range<cpp17_input_iterator> const>);
|
||||
|
||||
static_assert(std::ranges::common_range<test_non_const_common_range<cpp17_input_iterator> >);
|
||||
static_assert(!std::ranges::common_range<test_non_const_common_range<cpp17_input_iterator> const>);
|
||||
|
||||
struct subtly_not_common {
|
||||
int* begin() const;
|
||||
int const* end() const;
|
||||
};
|
||||
static_assert(stdr::range<subtly_not_common> && !stdr::common_range<subtly_not_common>);
|
||||
static_assert(stdr::range<subtly_not_common const> && !stdr::common_range<subtly_not_common const>);
|
||||
static_assert(std::ranges::range<subtly_not_common> && !std::ranges::common_range<subtly_not_common>);
|
||||
static_assert(std::ranges::range<subtly_not_common const> && !std::ranges::common_range<subtly_not_common const>);
|
||||
|
||||
struct common_range_non_const_only {
|
||||
int* begin() const;
|
||||
int* end();
|
||||
int const* end() const;
|
||||
};
|
||||
static_assert(stdr::range<common_range_non_const_only>&& stdr::common_range<common_range_non_const_only>);
|
||||
static_assert(stdr::range<common_range_non_const_only const> && !stdr::common_range<common_range_non_const_only const>);
|
||||
static_assert(std::ranges::range<common_range_non_const_only>&& std::ranges::common_range<common_range_non_const_only>);
|
||||
static_assert(std::ranges::range<common_range_non_const_only const> && !std::ranges::common_range<common_range_non_const_only const>);
|
||||
|
||||
struct common_range_const_only {
|
||||
int* begin();
|
||||
int const* begin() const;
|
||||
int const* end() const;
|
||||
};
|
||||
static_assert(stdr::range<common_range_const_only> && !stdr::common_range<common_range_const_only>);
|
||||
static_assert(stdr::range<common_range_const_only const>&& stdr::common_range<common_range_const_only const>);
|
||||
static_assert(std::ranges::range<common_range_const_only> && !std::ranges::common_range<common_range_const_only>);
|
||||
static_assert(std::ranges::range<common_range_const_only const>&& std::ranges::common_range<common_range_const_only const>);
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
#include "test_iterators.h"
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
|
||||
template <template <class...> class I>
|
||||
constexpr bool check_forward_range() {
|
||||
constexpr bool result = stdr::forward_range<test_range<I> >;
|
||||
static_assert(stdr::forward_range<test_range<I> const> == result);
|
||||
static_assert(stdr::forward_range<test_non_const_common_range<I> > == result);
|
||||
static_assert(stdr::forward_range<test_non_const_range<I> > == result);
|
||||
static_assert(stdr::forward_range<test_common_range<I> > == result);
|
||||
static_assert(stdr::forward_range<test_common_range<I> const> == result);
|
||||
static_assert(!stdr::forward_range<test_non_const_common_range<I> const>);
|
||||
static_assert(!stdr::forward_range<test_non_const_range<I> const>);
|
||||
constexpr bool result = std::ranges::forward_range<test_range<I> >;
|
||||
static_assert(std::ranges::forward_range<test_range<I> const> == result);
|
||||
static_assert(std::ranges::forward_range<test_non_const_common_range<I> > == result);
|
||||
static_assert(std::ranges::forward_range<test_non_const_range<I> > == result);
|
||||
static_assert(std::ranges::forward_range<test_common_range<I> > == result);
|
||||
static_assert(std::ranges::forward_range<test_common_range<I> const> == result);
|
||||
static_assert(!std::ranges::forward_range<test_non_const_common_range<I> const>);
|
||||
static_assert(!std::ranges::forward_range<test_non_const_range<I> const>);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,28 +18,28 @@
|
|||
#include "test_iterators.h"
|
||||
#include "test_range.h"
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(stdr::input_range<test_range<cpp17_input_iterator> >);
|
||||
static_assert(stdr::input_range<test_range<cpp17_input_iterator> const>);
|
||||
|
||||
static_assert(stdr::input_range<test_range<cpp20_input_iterator> >);
|
||||
static_assert(stdr::input_range<test_range<cpp20_input_iterator> const>);
|
||||
static_assert(std::ranges::input_range<test_range<cpp17_input_iterator> >);
|
||||
static_assert(std::ranges::input_range<test_range<cpp17_input_iterator> const>);
|
||||
|
||||
static_assert(stdr::input_range<test_non_const_range<cpp17_input_iterator> >);
|
||||
static_assert(stdr::input_range<test_non_const_range<cpp20_input_iterator> >);
|
||||
static_assert(std::ranges::input_range<test_range<cpp20_input_iterator> >);
|
||||
static_assert(std::ranges::input_range<test_range<cpp20_input_iterator> const>);
|
||||
|
||||
static_assert(!stdr::input_range<test_non_const_range<cpp17_input_iterator> const>);
|
||||
static_assert(!stdr::input_range<test_non_const_range<cpp20_input_iterator> const>);
|
||||
static_assert(std::ranges::input_range<test_non_const_range<cpp17_input_iterator> >);
|
||||
static_assert(std::ranges::input_range<test_non_const_range<cpp20_input_iterator> >);
|
||||
|
||||
static_assert(stdr::input_range<test_common_range<cpp17_input_iterator> >);
|
||||
static_assert(!stdr::input_range<test_common_range<cpp20_input_iterator> >);
|
||||
static_assert(!std::ranges::input_range<test_non_const_range<cpp17_input_iterator> const>);
|
||||
static_assert(!std::ranges::input_range<test_non_const_range<cpp20_input_iterator> const>);
|
||||
|
||||
static_assert(stdr::input_range<test_common_range<cpp17_input_iterator> const>);
|
||||
static_assert(!stdr::input_range<test_common_range<cpp20_input_iterator> const>);
|
||||
static_assert(std::ranges::input_range<test_common_range<cpp17_input_iterator> >);
|
||||
static_assert(!std::ranges::input_range<test_common_range<cpp20_input_iterator> >);
|
||||
|
||||
static_assert(stdr::input_range<test_non_const_common_range<cpp17_input_iterator> >);
|
||||
static_assert(!stdr::input_range<test_non_const_common_range<cpp20_input_iterator> >);
|
||||
static_assert(std::ranges::input_range<test_common_range<cpp17_input_iterator> const>);
|
||||
static_assert(!std::ranges::input_range<test_common_range<cpp20_input_iterator> const>);
|
||||
|
||||
static_assert(!stdr::input_range<test_non_const_common_range<cpp17_input_iterator> const>);
|
||||
static_assert(!stdr::input_range<test_non_const_common_range<cpp20_input_iterator> const>);
|
||||
static_assert(std::ranges::input_range<test_non_const_common_range<cpp17_input_iterator> >);
|
||||
static_assert(!std::ranges::input_range<test_non_const_common_range<cpp20_input_iterator> >);
|
||||
|
||||
static_assert(!std::ranges::input_range<test_non_const_common_range<cpp17_input_iterator> const>);
|
||||
static_assert(!std::ranges::input_range<test_non_const_common_range<cpp20_input_iterator> const>);
|
||||
|
|
|
@ -17,63 +17,63 @@
|
|||
|
||||
#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[]>);
|
||||
|
||||
static_assert(std::ranges::sized_range<int[5]>);
|
||||
static_assert(std::ranges::sized_range<int (&)[5]>);
|
||||
static_assert(!std::ranges::sized_range<int (&)[]>);
|
||||
static_assert(!std::ranges::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>);
|
||||
static_assert(std::ranges::sized_range<range_has_size>);
|
||||
static_assert(!std::ranges::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>);
|
||||
static_assert(std::ranges::sized_range<range_has_const_size>);
|
||||
static_assert(!std::ranges::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>);
|
||||
static_assert(std::ranges::sized_range<const_range_has_size>);
|
||||
static_assert(std::ranges::range<const_range_has_size const>);
|
||||
static_assert(!std::ranges::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>);
|
||||
static_assert(std::ranges::sized_range<const_range_has_const_size>);
|
||||
static_assert(std::ranges::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>);
|
||||
static_assert(std::ranges::sized_range<sized_sentinel_range_has_size>);
|
||||
static_assert(!std::ranges::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>);
|
||||
static_assert(std::ranges::sized_range<const_sized_sentinel_range_has_size>);
|
||||
static_assert(std::ranges::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>);
|
||||
static_assert(requires(non_range_has_size const x) { std::ranges::size(x); });
|
||||
static_assert(!std::ranges::sized_range<non_range_has_size>);
|
||||
static_assert(!std::ranges::sized_range<non_range_has_size const>);
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
#include <concepts>
|
||||
#include <ranges>
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<std::cmatch>);
|
||||
static_assert(!stdr::view<std::cmatch>);
|
||||
static_assert(stdr::sized_range<std::cmatch>);
|
||||
static_assert(!stdr::borrowed_range<std::cmatch>);
|
||||
static_assert(!stdr::viewable_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::contiguous_range<std::cmatch const>);
|
||||
static_assert(!stdr::view<std::cmatch const>);
|
||||
static_assert(stdr::sized_range<std::cmatch const>);
|
||||
static_assert(!stdr::borrowed_range<std::cmatch const>);
|
||||
static_assert(!stdr::viewable_range<std::cmatch const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<std::cmatch>, std::cmatch::iterator>);
|
||||
static_assert(std::ranges::common_range<std::cmatch>);
|
||||
static_assert(std::ranges::random_access_range<std::cmatch>);
|
||||
static_assert(std::ranges::contiguous_range<std::cmatch>);
|
||||
static_assert(!std::ranges::view<std::cmatch>);
|
||||
static_assert(std::ranges::sized_range<std::cmatch>);
|
||||
static_assert(!std::ranges::borrowed_range<std::cmatch>);
|
||||
static_assert(!std::ranges::viewable_range<std::cmatch>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<std::cmatch const>, std::cmatch::const_iterator>);
|
||||
static_assert(std::ranges::common_range<std::cmatch const>);
|
||||
static_assert(std::ranges::random_access_range<std::cmatch const>);
|
||||
static_assert(std::ranges::contiguous_range<std::cmatch const>);
|
||||
static_assert(!std::ranges::view<std::cmatch const>);
|
||||
static_assert(std::ranges::sized_range<std::cmatch const>);
|
||||
static_assert(!std::ranges::borrowed_range<std::cmatch const>);
|
||||
static_assert(!std::ranges::viewable_range<std::cmatch const>);
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
#include <concepts>
|
||||
#include <ranges>
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
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::contiguous_range<std::string>);
|
||||
static_assert(!stdr::view<std::string>);
|
||||
static_assert(stdr::sized_range<std::string>);
|
||||
static_assert(!stdr::borrowed_range<std::string>);
|
||||
static_assert(!stdr::viewable_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::contiguous_range<std::string const>);
|
||||
static_assert(!stdr::view<std::string const>);
|
||||
static_assert(stdr::sized_range<std::string const>);
|
||||
static_assert(!stdr::borrowed_range<std::string const>);
|
||||
static_assert(!stdr::viewable_range<std::string const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<std::string>, std::string::iterator>);
|
||||
static_assert(std::ranges::common_range<std::string>);
|
||||
static_assert(std::ranges::random_access_range<std::string>);
|
||||
static_assert(std::ranges::contiguous_range<std::string>);
|
||||
static_assert(!std::ranges::view<std::string>);
|
||||
static_assert(std::ranges::sized_range<std::string>);
|
||||
static_assert(!std::ranges::borrowed_range<std::string>);
|
||||
static_assert(!std::ranges::viewable_range<std::string>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<std::string const>, std::string::const_iterator>);
|
||||
static_assert(std::ranges::common_range<std::string const>);
|
||||
static_assert(std::ranges::random_access_range<std::string const>);
|
||||
static_assert(std::ranges::contiguous_range<std::string const>);
|
||||
static_assert(!std::ranges::view<std::string const>);
|
||||
static_assert(std::ranges::sized_range<std::string const>);
|
||||
static_assert(!std::ranges::borrowed_range<std::string const>);
|
||||
static_assert(!std::ranges::viewable_range<std::string const>);
|
||||
|
|
|
@ -17,22 +17,22 @@
|
|||
#include <concepts>
|
||||
#include <ranges>
|
||||
|
||||
namespace stdr = std::ranges;
|
||||
|
||||
static_assert(std::same_as<stdr::iterator_t<std::string_view>, std::string_view::iterator>);
|
||||
static_assert(stdr::common_range<std::string_view>);
|
||||
static_assert(stdr::random_access_range<std::string_view>);
|
||||
static_assert(stdr::contiguous_range<std::string_view>);
|
||||
static_assert(stdr::view<std::string_view> && stdr::enable_view<std::string_view>);
|
||||
static_assert(stdr::sized_range<std::string_view>);
|
||||
static_assert(stdr::borrowed_range<std::string_view>);
|
||||
static_assert(stdr::viewable_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::contiguous_range<std::string_view const>);
|
||||
static_assert(!stdr::view<std::string_view const> && !stdr::enable_view<std::string_view const>);
|
||||
static_assert(stdr::sized_range<std::string_view const>);
|
||||
static_assert(stdr::borrowed_range<std::string_view const>);
|
||||
static_assert(stdr::viewable_range<std::string_view const>);
|
||||
static_assert(std::same_as<std::ranges::iterator_t<std::string_view>, std::string_view::iterator>);
|
||||
static_assert(std::ranges::common_range<std::string_view>);
|
||||
static_assert(std::ranges::random_access_range<std::string_view>);
|
||||
static_assert(std::ranges::contiguous_range<std::string_view>);
|
||||
static_assert(std::ranges::view<std::string_view> && std::ranges::enable_view<std::string_view>);
|
||||
static_assert(std::ranges::sized_range<std::string_view>);
|
||||
static_assert(std::ranges::borrowed_range<std::string_view>);
|
||||
static_assert(std::ranges::viewable_range<std::string_view>);
|
||||
|
||||
static_assert(std::same_as<std::ranges::iterator_t<std::string_view const>, std::string_view::const_iterator>);
|
||||
static_assert(std::ranges::common_range<std::string_view const>);
|
||||
static_assert(std::ranges::random_access_range<std::string_view const>);
|
||||
static_assert(std::ranges::contiguous_range<std::string_view const>);
|
||||
static_assert(!std::ranges::view<std::string_view const> && !std::ranges::enable_view<std::string_view const>);
|
||||
static_assert(std::ranges::sized_range<std::string_view const>);
|
||||
static_assert(std::ranges::borrowed_range<std::string_view const>);
|
||||
static_assert(std::ranges::viewable_range<std::string_view const>);
|
||||
|
|
Loading…
Reference in New Issue