mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Use mixin expression instead of mixin declaration
This commit is contained in:
parent
826960b229
commit
c7ed8b2f04
1 changed files with 2 additions and 3 deletions
|
@ -1413,15 +1413,14 @@ if (isCallable!func)
|
|||
enum hasDefaultArg = mixin("(PT[i .. i+1] ", args, ") => true");
|
||||
static if (is(typeof(hasDefaultArg())))
|
||||
{
|
||||
mixin("
|
||||
enum get = (return scope PT[i .. i+1] ", args, ")
|
||||
enum get = mixin("(return scope PT[i .. i+1] ", args, ")
|
||||
{
|
||||
// If the parameter is lazy, we force it to be evaluated
|
||||
// like this.
|
||||
auto ", val, " = ", args, "[0];
|
||||
auto ", ptr, " = &", val, ";
|
||||
return *", ptr, ";
|
||||
};");
|
||||
}");
|
||||
enum Get = get();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue