Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
fix Issue 6333 - The 'capacity' function is not pure/nothrow/@safe
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jun 8, 2016
1 parent 5c54773 commit 0c87ca7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/object.d
Expand Up @@ -2943,12 +2943,12 @@ private
*
* Note: The capacity of a slice may be impacted by operations on other slices.
*/
@property size_t capacity(T)(T[] arr) pure nothrow
@property size_t capacity(T)(T[] arr) pure nothrow @trusted
{
return _d_arraysetcapacity(typeid(T[]), 0, cast(void *)&arr);
}
///
unittest
@safe unittest
{
//Static array slice: no capacity
int[4] sarray = [1, 2, 3, 4];
Expand Down

0 comments on commit 0c87ca7

Please sign in to comment.