The first constructor initializes the base class by calling basic_ostream(sb), where sb is the stored object of class basic_filebuf<Elem, Tr>. It also initializes sb by calling basic_filebuf<Elem, Tr>.
The second and third constructors initializes the base class by calling basic_ostream(sb). It also initializes sb by calling basic_filebuf<Elem, Tr> and then sb.open(_Filename, _Mode | ios_base::out). If the latter function returns a null pointer, the constructor calls setstate(failbit).