`std::filebuf` template specification in C++
A filebuf
object opens and manages a file pointer and serves as the stream buffer for fstream objects.
std::filebuf
is actually a typedef for std::basic_filebuf<char, std::char_traits<char> >
.
Wide-character file streams use std::wfilebuf
which is a typedef for std::basic_filebuf<wchar_t, std::char_traits<wchar_t> >
.
Use this tag for questions about the stream buffer used by std::fstream
, std::ifstream
, std::ofstream
and their wide-character equivalents. For questions about those classes themselves use fstream, ifstream or ofstream. For more general questions use the streambuf or iostream tags.