Bug 19689 – large types cannot be moved

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-02-20T08:26:09Z
Last change time
2019-02-26T12:25:12Z
Keywords
pull
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2019-02-20T08:26:09Z
struct VeryLargeType { static foreach (i; 500.iota) { mixin(format!"int v%s;"(i)); } } unittest { VeryLargeType a, b; move(a, b); } Result: std/traits.d(2848): Error: template instance `std.traits.RepresentationTypeTuple!(VeryLargeType).Impl!(int, int, int)` recursive expansion Expected: not that.
Comment #1 by dlang-bot — 2019-02-20T08:43:32Z
@FeepingCreature created dlang/phobos pull request #6873 "Fix issue 19689: don't use recursive template parameter iteration in std.traits." fixing this issue: - Fix issue 19689: don't use recursive template parameter iteration in std.traits. Pull inner Impl templates out into std.traits so they're only instantiated once. Use anySatisfy, staticMap instead of manually recursing. https://github.com/dlang/phobos/pull/6873
Comment #2 by dlang-bot — 2019-02-26T12:25:12Z
dlang/phobos pull request #6873 "Fix issue 19689: don't use recursive template parameter iteration in std.traits." was merged into master: - 8f24c53ec7e0c1900e724877e7a8c322b3e5c721 by Mathis Beer: Fix issue 19689: don't use recursive template parameter iteration in std.traits. Pull inner Impl templates out into std.traits so they're only instantiated once. Use anySatisfy, staticMap instead of manually recursing. https://github.com/dlang/phobos/pull/6873