Well, the solution certainly works - for EURO.
But, there's still something strange, which I can't explain completely:
1) With
USD, this works fine, with both the
get_money() manipulator as well as using the facet directly, though the stream's
showbase flag
isn't set. This
can be explained - The symbol is consumed because the pattern is "sign symbol space value". Since "symbol" appears before "value", it is consumed.
2) With
EUR, this works correctly with both the
get_money() manipulator, as well as using the facet directly, if the stream's
showbase flag
is set, for the local € symbol.
However, when using the international EUR symbol, it works correctly, only if the
showbase flag
isn't set:
http://coliru.stacked-crooked.com/a/14dff0d08506da67. The neg_format() pattern here is {sign value space symbol}.
If showbase
is set for the EUR symbol, it won't work. An error is returned and the value is returned as 0.
3) With
INR, this works correctly with the
get_money() manipulator, if the stream's
showbase flag
is set, for the local ₹ symbol.
However, when the facet is used directly, with or without showbase being set, it doesn't work, and 0 is read instead:
http://coliru.stacked-crooked.com/a/d79428e0ca2d318c
The neg_format() pattern here is {sign symbol space value}, and should have been consumed, since "symbol" occurs before "value".