[Issue 8260] New: * used three or more times on an array inside std.format.formattedRead

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 18 05:10:01 PDT 2012


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

           Summary: * used three or more times on an array inside
                    std.format.formattedRead
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-06-18 05:12:17 PDT ---
import std.format;
void main() {
    int[3] row;
    auto text = "10 20 30";
    formattedRead(text, "%(%d %)", row);
}


DMD 2.060alpha:

...\dmd2\src\phobos\std\format.d(555): Error: using * on an array is
deprecated; use *(_param_2).ptr instead
...\dmd2\src\phobos\std\format.d(566): Error: using * on an array is
deprecated; use *(_param_2).ptr instead
test.d(5): Error: template instance
std.format.formattedRead!(string,char,uint[3u]) error instantiating


Part inside formattedRead, that uses * three times:

        alias typeof(*args[0]) A;
        static if (isTuple!A)
        {
            foreach (i, T; A.Types)
            {
                (*args[0])[i] = unformatValue!(T)(r, spec);
                skipUnstoredFields();
            }
        }
        else
        {
            *args[0] = unformatValue!(A)(r, spec);

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