#5557 closed Bugs (fixed)
lexical_cast<int>("+2") failure
Reported by: | Ralf W. Grosse-Kunstleve | Owned by: | Antony Polukhin |
---|---|---|---|
Milestone: | To Be Determined | Component: | lexical_cast |
Version: | Boost Development Trunk | Severity: | Regression |
Keywords: | Cc: |
Description
boost svn trunk revision 72056 breaks
lexical_cast<int>("+2")
on all platforms we have (g++ 3.2 through 4.6, Visual C++ 8.0 through 10.0, Intel C++ 9 through 11).
I will attach a small reproducer. With g++ 4.4.4 I get:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
what(): bad lexical cast: source type value could not be interpreted as target
Attachments (1)
Change History (5)
by , 11 years ago
Attachment: | lexical_cast_72056_bug.cpp added |
---|
comment:1 by , 11 years ago
Status: | new → assigned |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 11 years ago
Great thanks.
If you have some more test cases, that are not included in lexical_cast test suite, please send/post them.
comment:4 by , 11 years ago
Thanks for the quick fix! There are no errors anymore in out nightly multi-platform tests.
small reproducer