digitalmars.D.bugs - [Issue 11340] New: ElementType and ElementEncodingType return odd qualified element types
- d-bugmail puremagic.com (30/30) Oct 24 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11340
- d-bugmail puremagic.com (12/15) Oct 24 2013 http://d.puremagic.com/issues/show_bug.cgi?id=11340
http://d.puremagic.com/issues/show_bug.cgi?id=11340 Summary: ElementType and ElementEncodingType return odd qualified element types Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com 04:41:51 PDT --- ----- import std.range; void main() { pragma(msg, ElementType!(string)); // dchar pragma(msg, ElementType!(wstring)); // dchar pragma(msg, ElementType!(dstring)); // immutable(dchar) pragma(msg, ElementEncodingType!(string)); // immutable(char) pragma(msg, ElementEncodingType!(wstring)); // immutable(wchar) pragma(msg, ElementEncodingType!(dstring)); // immutable(dchar) } ----- As far as I know these should all be const(T). Am I wrong? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 24 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11340 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID 07:40:12 PDT --- As commented here: https://github.com/D-Programming-Language/phobos/pull/1660#discussion_r7189412dstring is a non-narrows string. Because of this, calling front gives you an lvalue of the actual elements, as opposed to narrows strings, which give you decoded dchar: They're mutable, but rvalues.-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 24 2013