1 #ifndef TEMPORARYSTRING_HH
2 #define TEMPORARYSTRING_HH
27 template<
typename FillOp>
45 [[nodiscard]]
char*
data() {
return ptr; }
46 [[nodiscard]]
const char*
c_str()
const {
return ptr; }
48 [[nodiscard]]
operator std::string_view()
const {
return {ptr, n}; }
std::unique_ptr< char, FreeStringStorage > StringStorage
StringStorage allocate_string_storage(size_t size)
Allocate a 'StringStorage' large enough for 'size' characters.
const char * c_str() const
static constexpr size_t BUFSIZE
TemporaryString(TemporaryString &&)=delete
TemporaryString & operator=(TemporaryString &&)=delete
TemporaryString(size_t n_, FillOp op)
TemporaryString(const TemporaryString &)=delete
TemporaryString & operator=(const TemporaryString &)=delete
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.