Issue 3882: Use cast(void) instead of value capture

After discussion at https://d.puremagic.com/issues/show_bug.cgi?id=3882 I changed to using

```D
cast(void)
```

instead.