Dynamically allocated Array mutable but non resizeable

Jalil David Salamé Messina jalil.salame at tum.de
Tue Jun 15 08:40:10 UTC 2021


On Monday, 14 June 2021 at 17:34:00 UTC, Steven Schveighoffer 
wrote:
> D doesn't have head-const. So you must hide the mutable 
> implementation to get this to work.
>
> You'd want to do this anyway, since you don't want to directly 
> use the pointer for anything like indexing (it should first 
> validate the index is valid, at least in an assert).
>
> -Steve

Seems like I'll have to have a look at operator overloading, 
thanks for the clarification!


More information about the Digitalmars-d-learn mailing list