You could alternatively just use std::to_string here instead of Boost.Format.