Could we use Boost.Format here instead of snprintf? I think we should prefer the former for its type-safety and not having to statically declare the resulting buffer size.