www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7776] New: std.array.join on const array of strings too

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7776

           Summary: std.array.join on const array of strings too
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.array: join;
void main() {
    string[] data1 = ["foo", "bar"];
    auto r1 = join(data1, "_"); // OK
    const string[] data2 = ["foo", "bar"];
    auto r2 = join(data2, "_"); // error
}


DMD 2.059head gives:

test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) &&
isInputRange!(ElementType!(RoR)) && isForwardRange!(R) &&
is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R)))) does
not match any function template declaration
test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) &&
isInputRange!(ElementType!(RoR)) && isForwardRange!(R) &&
is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R))))
cannot deduce template function from argument types
!()(const(immutable(char)[][]),string)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 25 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7776


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 7690 ***

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