-
Notifications
You must be signed in to change notification settings - Fork 346
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
Bug in inline std::ostream& operator<<(std::ostream& os, const XLCellValue& value) ? #166
Comments
However, casting // This works:
std::stringstream sstream2;
sstream2 << (XLCellValue)wks.cell("A1").value();
REQUIRE(sstream2.str() == "Hello OpenXLSX!");
// This fails:
std::stringstream sstream3;
sstream3 << wks.cell("A1").value();
REQUIRE(sstream3.str() == "Hello OpenXLSX!"); |
make sure the CSV line does not end with a separator add reference tp issue troldal#166
Hi @ofenloch - you actually did find a bug: The XLCellValue overload for operator<< with a string stream was using XLCellValue::get with a reference string type (std::string_view), however this XLCellValue was a temporary object and by the time the return value was to be assigned to the string stream, it was invalid. I have implemented a fix for the operator overload and a workaround for accessing XLCellValue::get<>() with string references in the development-aral branch, patch 4ed9c97. I apologize for the late fix, I finally got around to work on the backlog of issues. Will close this when I merge the functionality into master. |
merged the patch into master today |
Thanks for the update, @aral-matrix. |
This test fails
Is this a bug or am I doing something wrong?
The text was updated successfully, but these errors were encountered: