Bug 19037 – Nullable should use moveEmplace to support any type.

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-06-28T06:42:02Z
Last change time
2018-07-28T04:14:06Z
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2018-06-28T06:42:02Z
For instance, right now Nullable does not work with a struct that has @disable this() and SysTime, because SysTime requires opAssign, which would let the struct notice that it's being called on an uninitialized value. move/moveEmplace could probably be used to avoid this, by avoiding the opAssign call entirely.
Comment #1 by default_357-line — 2018-06-28T06:44:31Z
Comment #2 by github-bugzilla — 2018-07-28T04:14:06Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/c1431b133bb26d3a777bdea0815c7212d1ff09d7 Use move/moveEmplace in Nullable Fixes issue 19037. https://github.com/dlang/phobos/commit/11b4a157352ca488dbe1201ece355a90978689bd Add testcase for issue 19037 unittest fix https://github.com/dlang/phobos/commit/c5d5f0ef46a183d9a99a0f772337d32c85f4bb61 Merge pull request #6619 from FeepingCreature/Nullable-use-moveEmplace Fix issue 19037: use move/moveEmplace in Nullable merged-on-behalf-of: Nathan Sashihara <[email protected]>