Prevent definition of non-disabled default constructors in template structs

This commit is contained in:
k-hara 2014-08-26 22:39:35 +09:00
parent 3a29f6dbad
commit d20e91ae01
2 changed files with 7 additions and 4 deletions

View file

@ -541,9 +541,9 @@ struct Task(alias fun, Args...)
enforce(this.pool !is null, "Job not submitted yet.");
}
private this(Args args)
static if(Args.length > 0)
{
static if(args.length > 0)
private this(Args args)
{
_args = args;
}