std::basic_filebuf<CharT, Traits>* close();
If a put area exist (e.g. file was opened for writing), first calls overflow(Traits::eof()) to write all pending output to the file, including any unshift sequences.
If the most recently called function, out of underflow(), overflow(), seekpos(), and seekoff(), was overflow(), then calls std::codecvt::unshift(), perhaps multiple times, to determine the unshift sequence according to the imbued locale, and writes that sequence to file with