std::istringstream (3) - Linux Manuals
std::istringstream: std::basic_istringstream
NAME
std::basic_istringstream - std::basic_istringstream
Synopsis
Defined in header <sstream>
template<
class CharT, (until C++11)
class Traits = std::char_traits<CharT>
> class basic_istringstream;
template<
class CharT,
class Traits = std::char_traits<CharT>, (since C++11)
class Allocator = std::allocator<CharT>
> class basic_istringstream;
The class template std::basic_istringstream implements input operations on memory (std::basic_string) based streams. It essentially wraps a raw string device implementation (std::basic_stringbuf) into a higher-level interface (std::basic_istream). The complete interface to unique std::basic_stringbuf members is provided.
std-basic istringstream-inheritance.svg
Inheritance diagram
Two specializations for common character types are also defined:
Defined in header <sstream>
Type Definition
istringstream basic_istringstream<char>
wistringstream basic_istringstream<wchar_t>
Member types
Member type Definition
char_type CharT
traits_type Traits; the program is ill-formed if Traits::char_type is not CharT.
int_type Traits::int_type
pos_type Traits::pos_type
off_type Traits::off_type
allocator_type Allocator (since C++11)
Member functions
constructor (public member function)
operator= moves the string stream
(C++11)
swap swaps two string streams
(C++11)
rdbuf (public member function)
String operations
str (public member function)
Non-member functions
std::swap(std::basic_istringstream) specializes the std::swap algorithm
(C++11)
Inherited from std::basic_istream
Member functions
Formatted input
operator>> (public member function of std::basic_istream<CharT,Traits>)
Unformatted input
get (public member function of std::basic_istream<CharT,Traits>)
peek (public member function of std::basic_istream<CharT,Traits>)
unget (public member function of std::basic_istream<CharT,Traits>)
putback (public member function of std::basic_istream<CharT,Traits>)
getline (public member function of std::basic_istream<CharT,Traits>)
ignore (public member function of std::basic_istream<CharT,Traits>)
read (public member function of std::basic_istream<CharT,Traits>)
readsome (public member function of std::basic_istream<CharT,Traits>)
gcount (public member function of std::basic_istream<CharT,Traits>)
Positioning
tellg (public member function of std::basic_istream<CharT,Traits>)
seekg (public member function of std::basic_istream<CharT,Traits>)
Miscellaneous
sync (public member function of std::basic_istream<CharT,Traits>)
Member classes
sentry (public member class of std::basic_istream<CharT,Traits>)
Inherited from std::basic_ios
Member types
Member type Definition
char_type CharT
traits_type Traits
int_type Traits::int_type
pos_type Traits::pos_type
off_type Traits::off_type
Member functions
State functions