On Tuesday, 10 May 2022 at 12:56:50 UTC, frame wrote:
On Tuesday, 10 May 2022 at 09:26:46 UTC, Salih Dincer wrote:

However, the compiler catches other errors! How can I solve this problem?

Thanks...

SDB@79

What about something like this?

```d
auto inclusiveRange(T = int)(T f = T(0), T l = T(0), T s = T(1))
if(!is(T == bool))
{
    //...
}
```

Not compiled, the compiler returns:
InclusiveRange.d(48): Error: template instance `InclusiveRange.ir!bool` does not match > template declaration `inclusiveRange(T = int)(T f = T(0), T l = T(0), T s = T(1))`
  with `T = bool`
 must satisfy the following constraint:
`       !is(T == bool)`

SDB@79

Reply via email to