[Issue 21629] New: std.csv report one record on empty input

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 11 13:09:34 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21629

          Issue ID: 21629
           Summary: std.csv report one record on empty input
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: deadalnix at gmail.com

I have the following dumbed down sample:

struct Reccord {
  string a;
  string b;
}

import std.csv;
string input = "";
foreach (reccord; cvsReader!Reccord(input)) {
  assert(0, "No reccord are expected");
}

This sample code trips the assert as cvsReccord emit one empty record with an
empty a and b. I think this is erroneous.

--


More information about the Digitalmars-d-bugs mailing list