0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd::fmt: mutable_buffer overloads for *snprintf().

This commit is contained in:
Jason Volk 2017-09-29 14:46:44 -07:00
parent 6558af5639
commit d0fe0218f4

View file

@ -32,6 +32,8 @@ namespace ircd::fmt
struct spec;
struct specifier;
struct sprintf;
struct vsprintf;
struct snprintf;
struct vsnprintf;
struct snstringf;
@ -121,6 +123,19 @@ class ircd::fmt::snprintf
}{}
};
struct ircd::fmt::sprintf
:snprintf
{
template<class... Args>
sprintf(const mutable_buffer &buf,
const char *const &fmt,
Args&&... args)
:snprintf
{
internal, data(buf), size(buf), fmt, va_rtti{std::forward<Args>(args)...}
}{}
};
struct ircd::fmt::vsnprintf
:snprintf
{
@ -134,6 +149,18 @@ struct ircd::fmt::vsnprintf
}{}
};
struct ircd::fmt::vsprintf
:snprintf
{
vsprintf(const mutable_buffer &buf,
const char *const &fmt,
const va_rtti &ap)
:snprintf
{
internal, data(buf), size(buf), fmt, ap
}{}
};
struct ircd::fmt::vsnstringf
:std::string
{