bsl::basic_istringstream::basic_istringstream

Create a basic_istringstream from a string, mode, and allocator.

Synopsis

Declared in <bslstl_istringstream.h>

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

Description

Use the specified initialString indicating the sequence of characters from which input will be streamed. Use the specified modeBitMask to indicate whether this buffer may be read from, written to, or both. Optionally specify the allocator used to supply memory. If allocator is not supplied, a default-constructed object of the (template parameter) ALLOCATOR type is used. If the ALLOCATOR argument is of type bsl::allocator (the default), then allocator, if supplied, shall be convertible to bslma::Allocator *. If the ALLOCATOR argument is of type bsl::allocator and allocator is not supplied, the currently installed default allocator will be used to supply memory.

Parameters

NameDescription
initialStringinitial character sequence for input
modeBitMaskopen mode for the stream buffer
allocatorallocator used to supply memory