void write_integer(OutIt& out, entry::integer_type val) { // the stack allocated buffer for keeping the // decimal representation of the number can // not hold number bigger than this: BOOST_STATIC_ASSERT(sizeof(entry::integer_type) <= 8); char buf[21]; for (char const* str = integer_to_str(buf, 21, val); *str != 0; ++str) { *out = *str; ++out; } }
int write_integer(OutIt& out, entry::integer_type val) { // the stack allocated buffer for keeping the // decimal representation of the number can // not hold number bigger than this: static_assert(sizeof(entry::integer_type) <= 8, "64 bit integers required"); char buf[21]; int ret = 0; for (char const* str = integer_to_str(buf, 21, val); *str != 0; ++str) { *out = *str; ++out; ++ret; } return ret; }