Concisely, robustly, temporarily stashing c++ iostream formats
One tiny improvement I'd suggest is that the stored state can all be declared const:

const std::ios_base::fmtflags flags;
const std::streamsize width;
const std::streamsize precision;
const charT fill;


There are no implications for assignability of fmtstash objects, as we already had a reference member.