Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetRowName didn't throw out of range when set row didn't exist #162

Open
lushengguo opened this issue Jun 1, 2024 · 0 comments
Open

SetRowName didn't throw out of range when set row didn't exist #162

lushengguo opened this issue Jun 1, 2024 · 0 comments
Assignees
Labels

Comments

@lushengguo
Copy link

lushengguo commented Jun 1, 2024

int main() {
  std::istringstream stream("a,b,c");
  rapidcsv::Document doc(stream, rapidcsv::LabelParams(0, 0));
  doc.SetRowName(0, "d");
  std::ostringstream oss;
  doc.Save(oss);
  std::cout << oss.str() << std::endl;
}

result:
a,b,c
d

if SetRowName didn't throw error, expected result shoud be:
a,b,c
d,,

Project has no example/test code tells how to dump data to a csv file, I misused API SetRowName like list code and fixed the error after reading the impl of SetRowName and noticed that there is an API called InsertRow >.< , SetCell throws exception when cell didn't exist, then why SetRowName didn't throw exception when row didn't exist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants