1#ifndef _C4_YML_WRITER_BUF_HPP_
2#define _C4_YML_WRITER_BUF_HPP_
4#ifndef _C4_YML_ERROR_HPP_
13C4_SUPPRESS_WARNING_MSVC_WITH_PUSH(4251)
37 else if(!error_on_excess)
46 _RYML_ERR_BASIC(
"not enough space in the given buffer");
53 C4_ALWAYS_INLINE
void append(
const char (&a)[N])
noexcept
55 static_assert(N > 1,
"empty string");
56 _RYML_ASSERT_BASIC( !
m_buf.overlaps(a));
64 _RYML_ASSERT_BASIC( ! s.overlaps(
m_buf));
70 C4_ALWAYS_INLINE
void append(
const char c)
noexcept
77 C4_ALWAYS_INLINE
void append(
const char c,
size_t num_times)
noexcept
85C4_SUPPRESS_WARNING_MSVC_POP
Error utilities used by ryml.
basic_substring< char > substr
a mutable string view
basic_substring< const char > csubstr
an immutable string view
(Undefined by default) Use shorter error message from checks/asserts: do not show the check condition...
size_t len
the length of the substring
C * str
a restricted pointer to the first character of the substring
void append(const char c, size_t num_times) noexcept
WriterBuf(substr sp) noexcept
substr get_result(bool error_on_excess) const
Return the buffer written so far, or optionally throw an error if the buffer was too small.
void append(csubstr s) noexcept
void append(const char c) noexcept
void append(const char(&a)[N]) noexcept