instantiate each of a tuple of templates (Take 2)

John Colvin john.loughran.colvin at gmail.com
Fri Aug 2 06:22:13 PDT 2013


On Friday, 2 August 2013 at 13:07:16 UTC, Dicebot wrote:
> On Friday, 2 August 2013 at 12:58:08 UTC, John Colvin wrote:
>> std/typetuple.d(664): Error: template instance pred!(fun6) 
>> cannot use local 'fun6' as parameter to non-global template 
>> isVoidFun(alias fun)
>>
>> So it's back to that same problem again.
>
> That is probably my most hated error message ever... Anyway, it 
> should work if "isVoidFun" is global (not nested) symbol, not 
> "fun6". Are you sure about it?

I'd made some changes before getting that error. Using 
monarch_dodra's code verbatim:

void main()
{
	void fun1(string i)
	{
		writeln("fun1 ", i);
	}
	
	a!(fun1)(99);
}

std/typetuple.d(664): Error: template instance pred!(fun1) cannot 
use local 'fun1' as parameter to non-global template 
isNonVoid(alias F)
and a whole load more crap


More information about the Digitalmars-d-learn mailing list