Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"08-24-10 - AutoPrintf Release"

1 Comment -

1 – 1 of 1
Blogger castano said...

Cool stuff. I suppose variadic templates would make the implementation a lot cleaner and avoid the autogenerated code, but it doesn't seem to be too bad anyway.

Some comments:

- On GNU's libc (that conforms with C99) vsnprintf does not return -1 when truncation occurs, but the size that the string would need to have for the operation to complete succesfully. See "Return value" in the man pages, and my implementation of format for how to use that.

- On GCC, when passing a va_list to another function you have to copy it with va_copy (which is not even defined in msvc). Otherwise it will crash on some platforms.

August 24, 2010 at 6:08 PM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.