From Jason Turner

[range.refinements]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp_9fu3_o8/{from.md → to.md} +23 -3
tmp/tmp_9fu3_o8/{from.md → to.md} RENAMED
@@ -26,11 +26,11 @@ template<class T>
26
  concept random_access_range =
27
  bidirectional_range<T> && random_access_iterator<iterator_t<T>>;
28
  ```
29
 
30
  `contiguous_range` additionally requires that the `ranges::data`
31
- customization point [[range.prim.data]] is usable with the range.
32
 
33
  ``` cpp
34
  template<class T>
35
  concept contiguous_range =
36
  random_access_range<T> && contiguous_iterator<iterator_t<T>> &&
@@ -53,14 +53,34 @@ which `ranges::begin` and `ranges::end` return objects of the same type.
53
  template<class T>
54
  concept common_range =
55
  range<T> && same_as<iterator_t<T>, sentinel_t<T>>;
56
  ```
57
 
 
 
 
 
 
 
 
 
58
  The `viewable_range` concept specifies the requirements of a `range`
59
- type that can be converted to a `view` safely.
60
 
61
  ``` cpp
62
  template<class T>
63
  concept viewable_range =
64
- range<T> && (borrowed_range<T> || view<remove_cvref_t<T>>);
 
 
 
 
 
 
 
 
 
 
 
 
65
  ```
66
 
 
26
  concept random_access_range =
27
  bidirectional_range<T> && random_access_iterator<iterator_t<T>>;
28
  ```
29
 
30
  `contiguous_range` additionally requires that the `ranges::data`
31
+ customization point object [[range.prim.data]] is usable with the range.
32
 
33
  ``` cpp
34
  template<class T>
35
  concept contiguous_range =
36
  random_access_range<T> && contiguous_iterator<iterator_t<T>> &&
 
53
  template<class T>
54
  concept common_range =
55
  range<T> && same_as<iterator_t<T>, sentinel_t<T>>;
56
  ```
57
 
58
+ ``` cpp
59
+ template<class R>
60
+ constexpr bool is-initializer-list = see below; // exposition only
61
+ ```
62
+
63
+ For a type `R`, *`is-initializer-list`*`<R>` is `true` if and only if
64
+ `remove_cvref_t<R>` is a specialization of `initializer_list`.
65
+
66
  The `viewable_range` concept specifies the requirements of a `range`
67
+ type that can be converted to a view safely.
68
 
69
  ``` cpp
70
  template<class T>
71
  concept viewable_range =
72
+ range<T> &&
73
+ ((view<remove_cvref_t<T>> && constructible_from<remove_cvref_t<T>, T>) ||
74
+ (!view<remove_cvref_t<T>> &&
75
+ (is_lvalue_reference_v<T> || (movable<remove_reference_t<T>> && !is-initializer-list<T>))));
76
+ ```
77
+
78
+ The `constant_range` concept specifies the requirements of a `range`
79
+ type whose elements are not modifiable.
80
+
81
+ ``` cpp
82
+ template<class T>
83
+ concept constant_range =
84
+ input_range<T> && constant-iterator<iterator_t<T>>;
85
  ```
86