24 #ifndef STATICLIB_IO_STRING_SINK_HPP
25 #define STATICLIB_IO_STRING_SINK_HPP
32 #include "staticlib/config.hpp"
61 str(std::move(str)) { }
84 str(std::move(other.str)) { }
93 str = std::move(other.str);
104 size_t ulen = span.
size();
105 size_t size = str.size();
106 if (!sl::support::is_streamsize(size))
throw io_exception(TRACEMSG(
107 "Target string size limit exceeded, length: [" + sl::support::to_string(str.size()) +
"]"));
108 str.resize(size + ulen);
109 std::memcpy(std::addressof(str.front()) + size, span.
data(), ulen);
110 return static_cast<std::streamsize
> (ulen);