-
Notifications
You must be signed in to change notification settings - Fork 44
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
Potential regression from v1.1.3 to v2.0.2 #104
Comments
Little follow up information: In the former case I actually end up in This is all on Visual Studio 17.9.3 |
This seems to be an error in the docs: the default behavior for scanning an integer without a type format specifier is auto res = scn::scan<int>("08", "{}"); is scanned as "0" (octal, as '0' is the octal prefix), with "8" left over. I think I'll revert the default back to decimal (like it was in v1) in the next major release: it seems to be doing more harm than good. For now, it can be worked around by explicitly stating the base with auto res = scn::scan<int, int, int, int, int, double>(
epoch, "{:4d}-{:2d}-{:2d}T{:2d}:{:2d}:{}"
); |
Thanks! |
Updating the submodules in our application and a parsing case that was working before is no longer working. This is a minimal example, in the original the
epoch
variable is of typeconst std::string&
:Before:
and no exception being thrown
Now:
ends up in vscan.h:115 with
result.error()
== "Argument list not exhausted"Also tried with:
auto res = scn::scan<int, int, int, int, int>(epoch, "{:4}-{:2}-{:2}T{:2}:{:2}:")
and then a secondscn::scan<double>(res->range(), "{}")
but the firstres
is also false.The text was updated successfully, but these errors were encountered: