It may be worth commenting that this does not support either seeking with seekp/seekg OR finding where the position is with tellp/tellg, which always return pos_type(-1) which would normally indicate that fail() is true.
I suspect that the unbuffered stream buf is the same, but haven't checked.





