Re: [PATCH v2 01/31] Introduce string_printf

Trevor Saunders
2016-10-19T13:43:46Z

> +std::string
> +string_printf (const char* fmt, ...)

std::string is unfortunately kind of large for a return value
its 4 * sizeof (void *), but maybe the simplicity matters more here.

> +{
> + std::string str;
> + va_list vp;
> +
> + /* Start by assuming some reasonable size will be sufficient. */
> + str.resize (1024);
> +
> + while (1)
> + {
> + size_t size;
> + int result;

you could declare these at first use right?

Trev