forward variadic arguments

Frank Benoit keinfarbton at nospam.xyz
Thu Jun 15 09:07:52 PDT 2006


> void execSql(char[] aSql, ...) {
> 	char[] sql;
> 	void putc(dchar c) {
> 		sql ~= c;
> 	}
> 
> 	std.format.doFormat(&putc, _arguments, _argptr);
> 
> 	database.exec(sql);
> }

And what happend to my format string 'aSql' ? :)

TypeInfo[] ti;
ti ~= aSql.typeinfo;
ti ~= _arguments

void* p = ????;
std.format.doFormat(&putc, ti, p);



More information about the Digitalmars-d-learn mailing list