Opened 18 years ago
Closed 17 years ago
#343 closed Bugs (Fixed)
Swapped source and target in exception
Reported by: | zigmar | Owned by: | kevlin |
---|---|---|---|
Milestone: | Component: | lexical_cast | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
When lexical_cast<> throws exception, the source and target parameters are swapped (source_type() return target and wise versa). The reason, that when exception is thrown, the parameters to exception's contructor passed in wrong order. The line 190 in "boost/lexical_cast.hpp" reads: throw_exception(bad_lexical_cast(typeid(Target), typeid(Source))); instead of: throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); (the constructor's first parameter is the type id of the source) Boost Version: 1.32.0
Note:
See TracTickets
for help on using tickets.