Thursday, October 14, 2010

fmt::flush

As discussed in the latest instalment of Quality Matters, having flushing output streams and verifying their status is a pre-requisite of writing a robust program. Doing this with the IOStreams is a somewhat onerous task; see the column for details. Using the new flush() function, introduced in version 0.6.2, makes doing so with FastFormat a breeze, as in:


#include <fastformat/ff.hpp>
#include <fastformat/sinks/ostream.hpp>

#include <iostream>

int main()
{
 ff::flush(ff::writeln(std::cout, "Hello, world!"));

 return 0;
}

FastFormat 0.6.2 released

I've just released version 0.6.2 of FastFormat, containing a number of improvements and several new features, which will be detailed in a series of forthcoming posts on this blog. The new features include the flush() function, whose purpose and behaviour is described in the latest instalment of my Quality Matters column in October's instalment of ACCU's Overload.