Skip to content

begin() iterator does not always point to begin() #261

@definable

Description

@definable

begin() iterator is expect to to point to the first row when used. This is not the case, the begin iterator increments.

The following returns values from 3 different rows:

auto s1 = (*reader.begin())[1].get();
auto s2 = (*reader.begin())[1].get();
auto s3 = (*reader.begin())[1].get();


for(::csv::CSVRow& row : reader)
{
}
auto s1 = (*reader.begin())[1].get();  <= index out of bounds:  begin() == end()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions