File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1415,6 +1415,11 @@ $(H3 $(LNAME2 void_arrays, Void Arrays))
14151415 elements in its original type. Array indices in slicing
14161416 operations are interpreted as byte indices. A void array cannot be indexed.)
14171417
1418+ $(P Another array can be $(RELATIVE_LINK2 array-copying, copied) into a void array's elements, but not in a
1419+ $(DDSUBLINK spec/function, safe-functions, `@safe` function).
1420+ This is because the void array may hold pointers.
1421+ A void array cannot be $(RELATIVE_LINK2 array-setting, filled).)
1422+
14181423 $(P Arrays of any type can be implicitly converted to a (tail qualified) void array - the
14191424 compiler inserts the appropriate calculations so that the $(D .length) of
14201425 the resulting array's size is in bytes rather than number of elements. Void
Original file line number Diff line number Diff line change @@ -3857,6 +3857,7 @@ $(H3 $(LNAME2 safe-functions, Safe Functions))
38573857 $(LI No $(DDSUBLINK spec/expression, pointer_arithmetic, pointer arithmetic)
38583858 (including pointer indexing & slicing).)
38593859 $(LI Cannot access array $(DDSUBLINK spec/arrays, ptr-property, `.ptr` property).)
3860+ $(LI Cannot copy into a $(DDSUBLINK spec/arrays, void_arrays, void array).)
38603861 $(LI Cannot access union fields that:)
38613862 * Have pointers or references overlapping with other types
38623863 * Have invariants overlapping with other types
You can’t perform that action at this time.
0 commit comments