Skip to content

Commit

Permalink
Merge pull request #2468 from 9rnsr/fix13311
Browse files Browse the repository at this point in the history
Prevent definition of non-disabled default constructors in template structs
  • Loading branch information
yebblies committed Aug 26, 2014
2 parents 3a29f6d + d20e91a commit a8bfa01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions std/parallelism.d
Expand Up @@ -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;
}
Expand Down
7 changes: 5 additions & 2 deletions std/typecons.d
Expand Up @@ -521,9 +521,12 @@ template Tuple(Specs...)
/**
* Constructor taking one value for each field.
*/
this(Types values)
static if (Types.length > 0)
{
field[] = values[];
this(Types values)
{
field[] = values[];
}
}

/**
Expand Down

0 comments on commit a8bfa01

Please sign in to comment.