Skip to content

Commit 18c4ade

Browse files
authored
docs: fix false statements in gsl::dyn_array docs (#1254)
#1228 was merged with a handful of unresolved comments. This PR resolves those comments.
1 parent 5230b7e commit 18c4ade

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/headers.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Convert the given value `I` to a `byte`. The template requires `I` to be in the
158158

159159
## <a name="H-dyn_array" />`<dyn_array>`
160160

161-
This header contains an owning dynamically allocated array type whose size is fixed between assignments.
161+
This header contains an owning dynamically allocated array type whose size is fixed at construction.
162162

163163
- [`gsl::dyn_array`](#user-content-H-dyn_array-dyn_array)
164164

@@ -170,7 +170,7 @@ class dyn_array;
170170
```
171171

172172
`gsl::dyn_array` owns a contiguous sequence of `T` objects allocated with `Allocator`.
173-
The number of elements is established when the object is constructed and remains unchanged until the object is copy-assigned.
173+
The number of elements is established when the object is constructed and remains unchanged.
174174
It provides bounds-checked element access and checked random-access iterators.
175175

176176
`gsl::dyn_array` is useful when the number of elements is known only at runtime, but the array should not grow or shrink through container operations.
@@ -242,8 +242,7 @@ constexpr dyn_array(dyn_array&&) = delete;
242242
dyn_array& operator=(dyn_array&&) = delete;
243243
```
244244

245-
Copy assignment replaces the contents with copies of the elements in `other`.
246-
Move construction and move assignment are explicitly deleted.
245+
Copy assignment, move assignment, and move construction are explicitly deleted.
247246

248247
##### Observers
249248

@@ -300,7 +299,7 @@ constexpr auto crend() const;
300299

301300
Returns a reverse iterator to the first element of the reversed range or to one past the last element of the reversed range.
302301

303-
The iterators are random-access iterators and perform bounds checking.
302+
The iterators are random-access iterators and perform bounds checking; they can never be invalidated.
304303
Dereferencing `end()`, moving before `begin()` or past `end()`, or comparing iterators from different arrays violates preconditions.
305304

306305
##### Comparisons

0 commit comments

Comments
 (0)