Static Foreach + Marking "compile time" variables

Chris Katko ckatko at gmail.com
Wed Mar 28 17:08:39 UTC 2018


On Wednesday, 28 March 2018 at 15:49:39 UTC, Chris Katko wrote:
> On Wednesday, 28 March 2018 at 15:46:42 UTC, Chris Katko wrote:
>> [...]
>
> Whoops! Wrong error message. That's if I replace isa(pos) with 
> IsIntegral.
>
> [...]

Okay, the key appears to be here:

funct2(123); //a function call

void funct2(A...)(A a)
	{
	enum hasRotate = isIntegral!(a[0]); // NOPE!
         }

//E: template instance isIntegral!(_param_0) does not match 
template declaration isIntegral(T)

But if I do:

funct2!(123); //note !

I get

//E: tuple A is used as a type


More information about the Digitalmars-d-learn mailing list