mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Prevent definition of non-disabled default constructors in template structs
This commit is contained in:
parent
3a29f6dbad
commit
d20e91ae01
2 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -521,10 +521,13 @@ template Tuple(Specs...)
|
|||
/**
|
||||
* Constructor taking one value for each field.
|
||||
*/
|
||||
static if (Types.length > 0)
|
||||
{
|
||||
this(Types values)
|
||||
{
|
||||
field[] = values[];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor taking a compatible array.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue