When trying to come up with an answer to this question, I wrote this little test-program:
#include
#include
#include
It works as expected.
I'm not sure what you are expecting...
Is this allowed?
That's probably not portable. Streams relies on char_traits
and on facets which are defined in the standard only for char
and wchar_t
. An implementation can provides more, but my bet would be that you are relying on a minimal default implementation of those templates and not on a conscious implementation for int
. I'd not be surprised that a more in depth use would leads to problems.