[Issue 12089] New: std.utf.validate and inout(char[])

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 6 06:40:22 PST 2014


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

           Summary: std.utf.validate and inout(char[])
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: john.loughran.colvin at gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2014-02-06 14:40:20 GMT ---
import std.utf;
void foo(inout(char[]) a)
{
        validate(a);
}

/home/space/phujfj/Installations/dmd/include/std/utf.d(954): Error: template
instance std.utf.codeUnitLimit!(const(inout(char)[])) does not match template
declaration codeUnitLimit(S) if (isSomeChar!(ElementEncodingType!S))
/home/space/phujfj/Installations/dmd/include/std/utf.d(956): Error: template
std.utf.decodeImpl cannot deduce function from argument types
!(true)(const(inout(char)[]), ulong), candidates are:
/home/space/phujfj/Installations/dmd/include/std/utf.d(1059):       
std.utf.decodeImpl(bool canIndex, S)(auto ref S str, ref size_t index) if (is(S
: const(char[])) || isInputRange!S && is(Unqual!(ElementEncodingType!S) ==
char))
/home/space/phujfj/Installations/dmd/include/std/utf.d(1194):       
std.utf.decodeImpl(bool canIndex, S)(auto ref S str, ref size_t index) if (is(S
: const(wchar[])) || isInputRange!S && is(Unqual!(ElementEncodingType!S) ==
wchar))
/home/space/phujfj/Installations/dmd/include/std/utf.d(1264):       
std.utf.decodeImpl(bool canIndex, S)(auto ref S str, ref size_t index) if (is(S
: const(dchar[])) || isInputRange!S && is(Unqual!(ElementEncodingType!S) ==
dchar))
/home/space/phujfj/Installations/dmd/include/std/utf.d(2007): Error: template
instance std.utf.decode!(const(inout(char)[])) error instantiating
inouttest.d(4):        instantiated from here: validate!(inout(char)[])
/home/space/phujfj/Installations/dmd/include/std/utf.d(2007): Error: decode
(auto ref const(inout(char)[]) str, ref ulong index) is not callable using
argument types (const(inout(char)[]), ulong)
inouttest.d(4): Error: template instance std.utf.validate!(inout(char)[]) error
instantiating

-- 
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