[Issue 5342] std.array does not respect immutable/const string qualifiers using front/back/etc

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 25 13:56:11 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=5342


Peter Alexander <peter.alexander.au at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au at gmail.co
                   |                            |m


--- Comment #1 from Peter Alexander <peter.alexander.au at gmail.com> 2014-01-25 13:56:06 PST ---
(In reply to comment #0)
> Essentially, the ElementType! of all strings is a mutable dchar, even if the
> string itself is immutable. This means that generic code, like
> isAssignable!(ElementType!string, ElementType!string) passes when it shouldn't.

I don't believe this is an issue. The element type of a string *is* dchar, and
that type *is* assignable.

If you want to know if a range's elements can be assigned to then
"hasAssignableElements!R" can be used.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list