November 22, 2016 Const/Immutable Slicing Syntax | ||||
|---|---|---|---|---|
| ||||
What's the cleanest way of doing const or immutable slicing in D?
My first thought is
cast((const typeof(x))x)[]
cast((immutable typeof(x))x)[]
but that's too verbose for my/taste.
Is there a Phobos function for this?
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply