Using A File Stream With A Character Type Other Than char Or wchar_t

Started by
10 comments, last by Ectara 10 years, 10 months ago

I created a custom templated character traits class, and substituted that in, and it still sets the bad and fail bits when I try to write and flush.

Advertisement

I can't seem to get it to work; it always sets the bad bit. Which mystifies me, because if I haven't correctly provided all of the required classes, I can't imagine how it even compiles, unless every class in the standard stream's implementation on my machine has a default implementation of just failing.

I guess I have to mark in the documentation that unless they're using C++11, they're stuck with char and wchar_t.

This topic is closed to new replies.

Advertisement