You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seems to be in the order of declaration/definition of AnyCast functions:
template
ValueType AnyCast(const Any& operand)
// ...
template
ValueType AnyCast(Any& operand)
The first one, when called, goes tail-spinning in a recursive call. Looking at it, it makes sense but I'm not sure how/why did this work so far and started manifesting itself all of a sudden.
If I run in a debugger:
Poco::format("%+03d", -7)
I get "0-7" as the output. This is wrong.
This breaks down as:
stream << setiosflags(ios::showpos) << setfill('0') << setw(3) << -7 << endl;
which not surprisingly, generates the same incorrect response...
I'd recommend processing the sign separately in formatOne() for the specifier '+', i.e.
stream << setiosflags(ios::showpos) << setw(1) << -7
then resetting the ios::showpos flag and shaving 1 off the width, and setting the fill, then passing the value a 2nd time.
The text was updated successfully, but these errors were encountered: