Forbid needless pointer casts

FlameInHeart validemail at not.really
Thu Feb 20 11:49:24 UTC 2020


On Thursday, 20 February 2020 at 11:41:18 UTC, Mathias Lang wrote:
> On Thursday, 20 February 2020 at 11:31:17 UTC, FlameInHeart 
> wrote:
...
>> Pointer casts are potentially nasty when refactoring and the

> Why would we forbid something that is legal ?

"Pointer casts are potentially nasty when refactoring"

> And in this case, it is obviously pointless, but consider 
> generic code:
> ```
> void foo (T) (T* m) {
>     T* m2 = cast(Unqual!(T)*) m;
> }
> ```

Yeah...


More information about the Digitalmars-d mailing list