[Issue 4803] std.range.chain with const string arguments

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 3 10:36:00 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4803



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-09-03 10:35:43 PDT ---
(In reply to comment #1)
> What exactly is the purpose of a constant string type?
> 
> That type evaluates to const(immutable(char)[]), which wouldn't make much sense
> to me.
> 
> Note that this will work:
> 
> import std.range: chain;
> void main() {
>     const (char)[] s = "hello";
>     auto r = chain(s, s);
> }
> 
> But I'm not sure if that's what you were after.

Woops, my bad. A string is still appendable, and a const one would not be. I
think I understand now.

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


More information about the Digitalmars-d-bugs mailing list