I'd recommend you to use templates with alias parameters but you
mentioned that you need to retain function context(for gotos,
continue, break, etc...)
One thing you could do is mix the ugly mixin solution with the
good one:
```D
//inside the function, so that you can access locals
On Monday, 26 April 2021 at 20:39:55 UTC, Jack wrote:
I have a block of code that the only thing that change is the
type passed in one of the template functions called so I'd like
to make a DRY for this. But I'm not just replacing by a
function due to control-flow, for example, there are
I have a block of code that the only thing that change is the
type passed in one of the template functions called so I'd like
to make a DRY for this. But I'm not just replacing by a function
due to control-flow, for example, there are if-statements where
one just break and the other return 0.