You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Issue 22141 - Property .capacity is not listed in the array prope… (#3356)
* Fix Issue 22141 - Property .capacity is not listed in the array properties
* Update spec/arrays.dd
Co-authored-by: Nick Treleaven <ntrel002@gmail.com>
Co-authored-by: Dennis <dkorpel@users.noreply.github.com>
Co-authored-by: Nick Treleaven <ntrel002@gmail.com>
Copy file name to clipboardExpand all lines: spec/arrays.dd
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -576,6 +576,8 @@ Returns an array literal with each element of the literal being the $(D .init) p
576
576
the number of bytes per array element.)
577
577
$(TROW $(D .length), Returns the number of elements in the array.
578
578
This is a fixed quantity for static arrays. It is of type $(D size_t).)
579
+
$(TROW $(D .capacity), Returns the number of elements that can be appended to the array without reallocating.
580
+
$(D .capacity) is always $(D 0) for static arrays because their size cannot be modified.)
579
581
$(TROW $(D .ptr), Returns a pointer to the first element of the array.)
580
582
$(TROW $(D .dup), Create a dynamic array of the same size and copy the contents of the array into it. The copy will have any immutability or const stripped. If this conversion is invalid the call will not compile.)
581
583
$(TROW $(D .idup), Create a dynamic array of the same size and copy the contents of the array into it. The copy is typed as being immutable. If this conversion is invalid the call will not compile.)
@@ -605,6 +607,7 @@ Returns an array literal with each element of the literal being the $(D .init) p
605
607
which is 8 in 32-bit builds and 16 on 64-bit builds.))
606
608
$(TROW $(D .length), Get/set number of elements in the
607
609
array. It is of type $(D size_t).)
610
+
$(TROW $(D .capacity), Returns the number of elements that can be appended to the array without reallocating.)
608
611
$(TROW $(D .ptr), Returns a pointer to the first element of the array.)
609
612
$(TROW $(D .dup), Create a dynamic array of the same size and copy the contents of the array into it. The copy will have any immutability or const stripped. If this conversion is invalid the call will not compile.)
610
613
$(TROW $(D .idup), Create a dynamic array of the same size and copy the contents of the array into it. The copy is typed as being immutable. If this conversion is invalid the call will not compile.)
0 commit comments