Bug 17443 – std.traits.ParameterDefaults fails for parameters with @disabled this(this)

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-05-27T10:04:04Z
Last change time
2024-12-01T16:30:17Z
Assigned to
No Owner
Creator
Stanislav Blinov
Moved to GitHub: phobos#10251 →

Comments

Comment #0 by stanislav.blinov — 2017-05-27T10:04:04Z
struct NonCopyable { @disable this(this); } void foo(NonCopyable p = NonCopyable.init) {} void main() { import std.traits; alias defaults = ParameterDefaults!foo; // Error: struct NonCopyable is not copyable because it is annotated with @disable. }
Comment #1 by bugzilla — 2020-01-09T19:00:59Z
To fix this IMHO __parameters needs to be worked on first. Currently ParameterDefaults uses a hack to get the value which doesn't work here.
Comment #2 by robert.schadek — 2024-12-01T16:30:17Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10251 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB