std::basic_istringstream< _CharT, _Traits, _Alloc >
Controlling input for std::string.
- Provided by: libstdc++-7-doc (Version: 7.5.0-6ubuntu2)
- Source: gcc-7
- Report a bug
Controlling input for std::string.
typedef basic_istream< char_type, traits_type >
__istream_type
typedef basic_string< _CharT, _Traits, _Alloc >
__string_type
typedef basic_stringbuf< _CharT, _Traits, _Alloc >
__stringbuf_type
typedef _Alloc allocator_type
typedef _CharT char_type
typedef traits_type::int_type int_type
typedef traits_type::off_type off_type
typedef traits_type::pos_type pos_type
typedef _Traits traits_type
basic_istringstream (basic_istringstream
&&__rhs)
basic_istringstream (const __string_type &__str,
ios_base::openmode __mode=ios_base::in)
Starts with an existing string buffer. basic_istringstream (const
basic_istringstream &)=delete
basic_istringstream (ios_base::openmode
__mode=ios_base::in)
Default constructor starts with an empty string buffer.
~basic_istringstream ()
The destructor does nothing. basic_istringstream & operator=
(basic_istringstream &&__rhs)
basic_istringstream & operator= (const
basic_istringstream &)=delete
__stringbuf_type * rdbuf () const
Accessing the underlying buffer. __string_type str () const
Copying out the string buffer. void str (const __string_type
&__s)
Setting a new buffer. void swap (basic_istringstream &__rhs)
class std::basic_istringstream< _CharT, _Traits, _Alloc >" Controlling input for std::string.
Template Parameters
This class supports reading from objects of type std::basic_string, using the inherited functions from std::basic_istream. To control the associated sequence, an instance of std::basic_stringbuf is used, which this page refers to as sb.
Definition at line 100 of file iosfwd.
Default constructor starts with an empty string buffer.
Parameters
ios_base::in is automatically included in __mode.
Initializes sb using __mode|in, and passes &sb to the base class initializer. Does not allocate any buffer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
Definition at line 416 of file sstream.
Starts with an existing string buffer.
Parameters
ios_base::in is automatically included in mode.
Initializes sb using str and mode|in, and passes &sb to the base class initializer.
That's a lie. We initialize the base class with NULL, because the string class does its own memory management.
Definition at line 434 of file sstream.
The destructor does nothing. The buffer is deallocated by the stringbuf object, not the formatting stream.
Definition at line 445 of file sstream.
Accessing the underlying buffer.
Returns
This hides both signatures of std::basic_ios::rdbuf().
Definition at line 485 of file sstream.
Copying out the string buffer.
Returns
Definition at line 493 of file sstream.
Setting a new buffer.
Parameters
Calls rdbuf()->str(s).
Definition at line 503 of file sstream.
Generated automatically by Doxygen for libstdc++ from the source code.