The following example will trigger an error with dmd:
```
/++
Multiplies the stride of the selected dimension by a factor.
Params:
slice = input slice
Dimensions = indexes of dimensions to be strided
factors = list of step extension factors
factor = step extension factors
Returns:
n-dimensional slice of the same type
+/
template strided(Dimensions...)
if (Dimensions.length)
{
static if (1 == 2)
auto strided(size_t N, Range)(Slice!(N, Range) slice, Repeat!(Dimensions.length, size_t) factor){}
else
auto strided(size_t N, Range)(Slice!(N, Range) slice, Repeat!(Dimensions.length, size_t) factors){}
}
```
with `dmd -w -D` yields:
```
foo.d(11): Warning: Ddoc: function declaration has no parameter 'slice'
foo.d(11): Warning: Ddoc: function declaration has no parameter 'factors'
foo.d(11): Warning: Ddoc: function declaration has no parameter 'factor'
```
without the static if it works fine.
Comment #1 by robert.schadek — 2024-12-13T18:51:02Z