digitalmars.D.bugs - [Issue 13544] New: calls to std.file.FileException are idup-ing
- via Digitalmars-d-bugs (22/22) Sep 27 2014 https://issues.dlang.org/show_bug.cgi?id=13544
https://issues.dlang.org/show_bug.cgi?id=13544 Issue ID: 13544 Summary: calls to std.file.FileException are idup-ing their string arguments Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: bugzilla digitalmars.com The signature for functions like std.file.copy() takes "in char[]" so it can be called with both mutable and immutable strings. If an exception gets thrown, the conservative assumption is that the source may get changed so the string is duplicated. The problem, again, is bloat. The solution is to add two overloads for FileException, one taking string and one taking const(char)[]. --
Sep 27 2014