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:
parent
6558af5639
commit
d0fe0218f4
1 changed files with 27 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue