Skip to content

Commit 2c0d274

Browse files
RazvanN7dkorpelntrel
authored
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>
1 parent f5e5151 commit 2c0d274

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/arrays.dd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,8 @@ Returns an array literal with each element of the literal being the $(D .init) p
576576
the number of bytes per array element.)
577577
$(TROW $(D .length), Returns the number of elements in the array.
578578
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.)
579581
$(TROW $(D .ptr), Returns a pointer to the first element of the array.)
580582
$(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.)
581583
$(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
605607
which is 8 in 32-bit builds and 16 on 64-bit builds.))
606608
$(TROW $(D .length), Get/set number of elements in the
607609
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.)
608611
$(TROW $(D .ptr), Returns a pointer to the first element of the array.)
609612
$(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.)
610613
$(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

Comments
 (0)