Suppose there is a variable that is set once per run, and is (supposed) never to be altered again. However, the value to which it is set is not known at compile time.
Example below, variable is 'ArrPtr';
```
ubyte[10] Arr;

// immutable void* ArrPtr;
void* ArrPtr;

void main() {

   ArrPtr = cast(void*)Arr[0];

// <Lots of code depending on ArrPtr, but not supposed to modify ArrPtr>

}
```
Is there a way of getting D to guarantee that ArrPtr is never modified after
```
   ArrPtr = cast(void*)Arr[0];
```

Best regards

Reply via email to