From Jason Turner

[string.view.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5ah96rue/{from.md → to.md} +24 -0
tmp/tmp5ah96rue/{from.md → to.md} RENAMED
@@ -45,5 +45,29 @@ template<class It, class End>
45
  - `End` models `sized_sentinel_for<It>`.
46
 
47
  *Effects:* Initializes `data_` with `to_address(begin)` and initializes
48
  `size_` with `end - begin`.
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  - `End` models `sized_sentinel_for<It>`.
46
 
47
  *Effects:* Initializes `data_` with `to_address(begin)` and initializes
48
  `size_` with `end - begin`.
49
 
50
+ *Throws:* When and what `end - begin` throws.
51
+
52
+ ``` cpp
53
+ template<class R>
54
+ constexpr explicit basic_string_view(R&& r);
55
+ ```
56
+
57
+ Let `d` be an lvalue of type `remove_cvref_t<R>`.
58
+
59
+ *Constraints:*
60
+
61
+ - `remove_cvref_t<R>` is not the same type as `basic_string_view`,
62
+ - `R` models `ranges::contiguous_range` and `ranges::sized_range`,
63
+ - `is_same_v<ranges::range_value_t<R>, charT>` is `true`,
64
+ - `is_convertible_v<R, const charT*>` is `false`, and
65
+ - `d.operator ::std::basic_string_view<charT, traits>()` is not a valid
66
+ expression.
67
+
68
+ *Effects:* Initializes `data_` with `ranges::data(r)` and `size_` with
69
+ `ranges::size(r)`.
70
+
71
+ *Throws:* Any exception thrown by `ranges::data(r)` and
72
+ `ranges::size(r)`.
73
+