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: [email protected]
Reporter: [email protected]
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)[].
--