mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Merge pull request #2015 from monarchdodra/emplaceQual
Improve emplaceRef for qualified construction
This commit is contained in:
commit
cecd745cef
3 changed files with 191 additions and 175 deletions
|
@ -799,7 +799,7 @@ template reduce(fun...) if (fun.length >= 1)
|
|||
result = void;
|
||||
foreach (i, T; result.Types)
|
||||
{
|
||||
emplaceRef(result[i], seed);
|
||||
emplaceRef!T(result[i], seed);
|
||||
}
|
||||
r.popFront();
|
||||
return reduce(result, r);
|
||||
|
@ -865,7 +865,7 @@ template reduce(fun...) if (fun.length >= 1)
|
|||
|
||||
foreach (i, T; result.Types)
|
||||
{
|
||||
emplaceRef(result[i], elem);
|
||||
emplaceRef!T(result[i], elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1456,7 +1456,7 @@ void uninitializedFill(Range, Value)(Range range, Value filler)
|
|||
|
||||
// Must construct stuff by the book
|
||||
for (; !range.empty; range.popFront())
|
||||
emplaceRef(range.front, filler);
|
||||
emplaceRef!T(range.front, filler);
|
||||
}
|
||||
else
|
||||
// Doesn't matter whether fill is initialized or not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue