Constructors

Synopses

Declared in <bslstl_stringbuf.h>

Create a basic_stringbuf by move‐constructing from original.

Create a basic_stringbuf by moving from initialString.

Create a basic_stringbuf object.

explicit
basic_stringbuf(allocator_type const& allocator = allocator_type());

Create a basic_stringbuf from a string‐view‐like initial value.

template<class STRING_VIEW_LIKE_TYPE>
explicit
basic_stringbuf(STRING_VIEW_LIKE_TYPE const& initialString);

Create a basic_stringbuf with the specified open mode.

explicit
basic_stringbuf(
    std::ios_base::openmode modeBitMask,
    allocator_type const& allocator = allocator_type());

Create a basic_stringbuf by moving from initialString.

basic_stringbuf(
    BloombergLP::bslmf::MovableRef<StringType> initialString,
    std::ios_base::openmode modeBitMask);

Create a basic_stringbuf by moving from initialString.

Create a basic_stringbuf from the specified initial string.

explicit
basic_stringbuf(
    StringType const& initialString,
    allocator_type const& allocator = allocator_type());

Create a basic_stringbuf by move‐constructing from original.

basic_stringbuf(
    basic_stringbuf&& original,
    allocator_type const& allocator);

Create a basic_stringbuf from a string‐view‐like value and mode.

template<class STRING_VIEW_LIKE_TYPE>
basic_stringbuf(
    STRING_VIEW_LIKE_TYPE const& initialString,
    std::ios_base::openmode modeBitMask);

Create a basic_stringbuf from a string with a different allocator.

template<class SALLOC>
explicit
basic_stringbuf(
    bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC> const& initialString,
    allocator_type const& allocator = allocator_type())
requires !bsl::is_same<ALLOCATOR, SALLOC>::value;

Create a basic_stringbuf by moving from initialString.

basic_stringbuf(
    BloombergLP::bslmf::MovableRef<StringType> initialString,
    std::ios_base::openmode modeBitMask,
    allocator_type const& allocator);

Create a basic_stringbuf from an initial string and open mode.

basic_stringbuf(
    StringType const& initialString,
    std::ios_base::openmode modeBitMask,
    allocator_type const& allocator = allocator_type());

Create a basic_stringbuf from a string and open mode.

template<class SALLOC>
basic_stringbuf(
    bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC> const& initialString,
    std::ios_base::openmode modeBitMask,
    allocator_type const& allocator = allocator_type())
requires !bsl::is_same<ALLOCATOR, SALLOC>::value;

Parameters

Name

Description

original

object from which to move‐construct

initialString

initial character sequence moved into the buffer

allocator

allocator used to supply memory

modeBitMask

open mode for the stream buffer

Created with MrDocs