Compartir a través de


basic_istringstream::basic_istringstream

Constructs an object of type basic_istringstream.

explicit basic_istringstream(
   ios_base::openmode _Mode = ios_base::in
);
explicit basic_istringstream(
   const basic_string<Elem, Tr, Alloc>& _Str,
   ios_base::openmode _Mode = ios_base::in
);
basic_istringstream(
    basic_istringstream&& _Right
);

Parameters

  • _Mode
    One of the enumerations in ios_base::openmode.

  • _Str
    An object of type basic_string.

  • _Right
    An rvalue reference of a basic_istringstream object.

Remarks

The first constructor initializes the base class by calling basic_istream(sb), where sb is the stored object of class basic_stringbuf<Elem, Tr, Alloc>. It also initializes sb by calling basic_stringbuf<Elem, Tr, Alloc>(_Mode | ios_base::in).

The second constructor initializes the base class by calling basic_istream(sb). It also initializes sb by calling basic_stringbuf<Elem, Tr, Alloc>(_Str, _Mode | ios_base::in).

The third constructor initializes the object with the contents of _Right, treated as an rvalue reference.

Requirements

Header: <sstream>

Namespace: std

See Also

Reference

basic_istringstream Class

iostream Programming

iostreams Conventions

Other Resources

basic_istringstream Members