emplace doesn't forward aeguments
kinke
noone at nowhere.com
Thu Jan 28 23:18:21 UTC 2021
On Thursday, 28 January 2021 at 21:15:49 UTC, vitamin wrote:
> Is there reason why std.conv.emplace doesn't forward arguments
> to __ctor?
Yeah, a bug in the emplace() version for classes, some missing
`forward!args` in there (it works when emplacing a struct with
identical ctor). E.g.
https://github.com/dlang/druntime/blob/e2e304e1709b0b30ab65471a98023131f0e7620c/src/core/lifetime.d#L124-L128 if you want to fix it (std.conv.emplace is now an alias for core.lifetime.emplace in Phobos master).
More information about the Digitalmars-d-learn
mailing list