Parameters declared as the alias of a template won't accept the arguments of the same type.

Elfstone elfstone at yeah.net
Sun May 1 12:39:08 UTC 2022


On Sunday, 1 May 2022 at 11:37:28 UTC, JG wrote:
> On Sunday, 1 May 2022 at 11:34:49 UTC, JG wrote:
>> [...]
>
> The static assert isn't needed.
>
>
> ```d
> enum isVector(V) = is(V==MatrixImpl!(S,1,N),S,size_t N);
>
> @nogc
> auto dot1(V)(in V lhs, in V rhs)
> if(isVector!V) {
>      static if(is(V==MatrixImpl!(S,1,N),S,N)) { S ret=0; return 
> ret; }
> }
> ```

Great, I'm using the constraint, until it's fixed.
Will it be fixed though? The DIP that Tejas linked is from 2020!!!


More information about the Digitalmars-d-learn mailing list