This behaves just like a std::filebuf, but a temporary file is created and destroyed to contains the results written by the sub-thread associated to such a buffer. This is one of the buffer types used here. Putting it into a struct, reduces compilation time. It works as well withtout deriving. NOTE: filgen_tmpnam is not threadsafe.