Bug 8516 – std.string.representation works incorrect for shared(const(T)) types
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-08-07T00:16:00Z
Last change time
2012-08-21T08:31:53Z
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2012-08-07T00:16:46Z
---
import std.string;
static assert(is(typeof(representation(cast(shared(const(char))[]) "hello")) == shared(const(ubyte)))); // Fails
---
Also `representation` implementation is ugly and documentation tells that it "Returns the representation type" that is incorrect because it returns a value as it's a function.
Comment #1 by verylonglogin.reg — 2012-08-07T00:18:44Z