http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
--- Comment #8 from Howard Hinnant <howard.hinnant at gmail dot com> --- Here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1862.html#27.4.4%20-%20Class%20template%20basic_ios is a good list of what needs to be done. It is an old paper, so it needs to be cross-checked against N3936. But the differences (if any) should be few and minor. The changes in this part of the standard are confusing to understand, because of the use of virtual inheritance. However if one just blindly follows the recipe, backed up by a few unit tests, things will just work. The more difficult parts are the concrete streambufs: basic_filebuf and basic_streambuf. Once those are in place, the streams just fall into place with very little code.