tmp/tmph3x_gmpt/{from.md → to.md}
RENAMED
|
@@ -2,31 +2,31 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr basic_string_view() noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*Ensures:* `size_ == 0` and `data_ == nullptr`.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
constexpr basic_string_view(const charT* str);
|
| 11 |
```
|
| 12 |
|
| 13 |
*Preconditions:* \[`str`, `str + traits::length(str)`) is a valid range.
|
| 14 |
|
| 15 |
-
*Effects:* Constructs a `basic_string_view`, initializing
|
| 16 |
-
`str` and initializing
|
| 17 |
|
| 18 |
*Complexity:* 𝑂(`traits::length(str)`).
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
constexpr basic_string_view(const charT* str, size_type len);
|
| 22 |
```
|
| 23 |
|
| 24 |
*Preconditions:* \[`str`, `str + len`) is a valid range.
|
| 25 |
|
| 26 |
-
*Effects:* Constructs a `basic_string_view`, initializing
|
| 27 |
-
`str` and initializing
|
| 28 |
|
| 29 |
``` cpp
|
| 30 |
template<class It, class End>
|
| 31 |
constexpr basic_string_view(It begin, End end);
|
| 32 |
```
|
|
@@ -42,12 +42,12 @@ template<class It, class End>
|
|
| 42 |
|
| 43 |
- \[`begin`, `end`) is a valid range.
|
| 44 |
- `It` models `contiguous_iterator`.
|
| 45 |
- `End` models `sized_sentinel_for<It>`.
|
| 46 |
|
| 47 |
-
*Effects:* Initializes
|
| 48 |
-
|
| 49 |
|
| 50 |
*Throws:* When and what `end - begin` throws.
|
| 51 |
|
| 52 |
``` cpp
|
| 53 |
template<class R>
|
|
@@ -63,11 +63,11 @@ Let `d` be an lvalue of type `remove_cvref_t<R>`.
|
|
| 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
|
| 69 |
`ranges::size(r)`.
|
| 70 |
|
| 71 |
*Throws:* Any exception thrown by `ranges::data(r)` and
|
| 72 |
`ranges::size(r)`.
|
| 73 |
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr basic_string_view() noexcept;
|
| 5 |
```
|
| 6 |
|
| 7 |
+
*Ensures:* *`size_`*` == 0` and *`data_`*` == nullptr`.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
constexpr basic_string_view(const charT* str);
|
| 11 |
```
|
| 12 |
|
| 13 |
*Preconditions:* \[`str`, `str + traits::length(str)`) is a valid range.
|
| 14 |
|
| 15 |
+
*Effects:* Constructs a `basic_string_view`, initializing *data\_* with
|
| 16 |
+
`str` and initializing *size\_* with `traits::length(str)`.
|
| 17 |
|
| 18 |
*Complexity:* 𝑂(`traits::length(str)`).
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
constexpr basic_string_view(const charT* str, size_type len);
|
| 22 |
```
|
| 23 |
|
| 24 |
*Preconditions:* \[`str`, `str + len`) is a valid range.
|
| 25 |
|
| 26 |
+
*Effects:* Constructs a `basic_string_view`, initializing *data\_* with
|
| 27 |
+
`str` and initializing *size\_* with `len`.
|
| 28 |
|
| 29 |
``` cpp
|
| 30 |
template<class It, class End>
|
| 31 |
constexpr basic_string_view(It begin, End end);
|
| 32 |
```
|
|
|
|
| 42 |
|
| 43 |
- \[`begin`, `end`) is a valid range.
|
| 44 |
- `It` models `contiguous_iterator`.
|
| 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>
|
|
|
|
| 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 |
|