mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Mentioning that a container is not a range.
This commit is contained in:
parent
3da26bc24d
commit
33261628ea
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,12 @@ This means that pointers to elements of an $(D Array) will become
|
|||
dangling as soon as the element is removed from the $(D Array). On the other hand
|
||||
the memory allocated by an $(D Array) will be scanned by the GC and
|
||||
GC managed objects referenced from an $(D Array) will be kept alive.
|
||||
|
||||
Note:
|
||||
|
||||
When using $(D Array) with range-based functions like those in $(D std.algorithm),
|
||||
$(Array) must be sliced to get a range (for example, use $(D array[].map!)
|
||||
instead of $(D array.map!)). The container itself is not a range.
|
||||
*/
|
||||
struct Array(T)
|
||||
if (!is(Unqual!T == bool))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue