We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I, for whichever reson, have a string which contains a CSV as a substring.
Currently when calling parse("1,2,3,4"sv.substr(2),format) the following code is executed
CSVReader parse(csv::string_view in, CSVFormat format) { std::stringstream stream(in.data()); return CSVReader(stream, format); }
This will read memory outside the string view due to the following constructor bing invoked:
explicit basic_stringstream ( std::basic_string<CharT, Traits, Allocator>&& str, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out);
In c++ 26 the following is fine
CSVReader parse(csv::string_view in, CSVFormat format) { std::stringstream stream(in); return CSVReader(stream, format); }
Untill then, please document this behaviour or change it so the call is instead using a correctly constructed string
CSVReader parse(csv::string_view in, CSVFormat format) { std::stringstream stream(std::string{in}); return CSVReader(stream, format); }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I, for whichever reson, have a string which contains a CSV as a substring.
Currently when calling parse("1,2,3,4"sv.substr(2),format) the following code is executed
This will read memory outside the string view due to the following constructor bing invoked:
In c++ 26 the following is fine
Untill then, please document this behaviour or change it so the call is instead using a correctly constructed string
The text was updated successfully, but these errors were encountered: