digitalmars.D.learn - Const/Immutable Slicing Syntax
- =?UTF-8?B?Tm9yZGzDtnc=?= (6/6) Nov 22 2016 What's the cleanest way of doing const or immutable slicing in D?
- Jack Applegame (2/2) Nov 22 2016 cast(const) x[];
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?
Nov 22 2016








Jack Applegame <japplegame gmail.com>