bsl::basic_ostringstream::str

str overloads

Synopses

Declared in <bslstl_ostringstream.h>

Return the internally buffered sequence of characters maintained by this stream, leaving the stream empty.

StringType
str() &&;
» more...

Return the internally buffered sequence of characters maintained by this stream object.

StringType
str() const &;
» more...

Reset this stream's buffered character sequence to value.

void
str(BloombergLP::bslmf::MovableRef<StringType> value);
» more...

Reset this stream's buffered character sequence to value.

void
str(StringType const& value);
» more...

Return a copy of the stream buffer using the specified allocator.

template<class SALLOC>
basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>
str(SALLOC const& allocator) const
requires bsl::IsStdAllocator<SALLOC>::value;
» more...

Reset this stream's buffered character sequence to value.

template<class STRING_VIEW_LIKE_TYPE>
void
str(STRING_VIEW_LIKE_TYPE const& value);
» more...

Reset this stream's buffered character sequence to value.

template<class SALLOC>
void
str(basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC> const& value)
requires !bsl::is_same<ALLOCATOR, SALLOC>::value;
» more...

Return Value

  • buffered character sequence, leaving this stream empty
  • copy of the buffered character sequence

Parameters

NameDescription
valuenew character sequence for the stream buffer
allocatorallocator for the returned string