std::begin(std::valarray)

template< class T > /*unspecified1*/ begin( valarray<T>& v ); (1) (since C++11) template< class T > /*unspecified2*/ begin( const valarray<T>& v ); (2) (since C++11) The overload of std::begin for valarray returns an iterator of unspecified type referring to the first element in the numeric array. 1) The return type meets the requirements of mutable RandomAccessIterator. 2) The return type meets the requirements of constant RandomAccessIterator.

std::basic_stringstream::rdbuf

std::basic_stringbuf<CharT, Traits, Allocator>* rdbuf() const; Returns pointer to the underlying raw string device object. Parameters (none). Return value Pointer to the underlying raw string device. Example

std::basic_stringstream::basic_stringstream

explicit basic_stringstream( ios_base::openmode mode = ios_base::in|ios_base::out ); (1) explicit basic_stringstream( const std::basic_string<CharT,Traits,Allocator>& str, ios_base::openmode mode = ios_base::in|ios_base::out ); (2) basic_stringstream( basic_stringstream&& other ); (3) (since C++11) Constructs new string stream. 1) Constructs new underlying string device. The underlying basic_stringbuf object is constructed as basic_strin

std::basic_stringstream::str

std::basic_string<CharT,Traits,Allocator> str() const; (1) void str(const std::basic_string<CharT,Traits,Allocator>& new_str); (2) Manages the contents of the underlying string object. 1) Returns a copy of the underlying string as if by calling rdbuf()->str(). 2) Replaces the contents of the underlying string as if by calling rdbuf()->str(new_str). Parameters new_str - new contents of the underlying string Return value 1) a copy of the underlyin

std::basic_stringstream

Defined in header <sstream> template< class CharT, class Traits = std::char_traits<CharT> > class basic_stringstream; (until C++11) template< class CharT, class Traits = std::char_traits<CharT>, class Allocator = std::allocator<CharT> > class basic_stringstream; (since C++11) The class template std::basic_stringstream implements input/output operations on memory (std::basic_string) based streams. It essentially wra

std::basic_stringstream::swap

void swap( basic_stringstream& other ); (since C++11) Exchanges the state of the stream with those of other. This is done by callingbasic_iostream<CharT, Traits>::swap(other) and rdbuf()->swap(*other.rdbuf()). Parameters other - stream to exchange the state with Return value (none). Example See also operator= (C++11) moves the string stream (public member function) swap (C++11) swaps two basic_stringbuf objects (public member function of st

std::basic_stringbuf::underflow

protected: virtual int_type underflow() Reads the next character from the get area of the buffer. Specifically: 1) If the input sequence has a read position available (egptr() > gptr()), returns Traits::to_int_type(*gptr()) 2) Otherwise, if pptr() > egptr() (some characters were inserted into the stream since the last time overflow() changed egptr()) then extends the end of the get area to include the most recently inserted characters, by changing egptr() to equal pptr(), and t

std::basic_stringbuf::swap

void swap( std::basic_stringbuf& rhs ) (since C++11) Swaps the state and the contents of *this and rhs. Parameters rhs - another basic_stringbuf Return value (none). Notes This function is called automatically when swapping std::stringstream objects, it is rarely necessary to call it directly. Example #include <sstream> #include <string> #include <iostream> int main() { std::istringstream one("one"); std::ostringstream two("two");

std::basic_stringbuf::str

std::basic_string<CharT, Traits, Allocator> str() const; (1) void str( const std::basic_string<CharT, Traits, Allocator>& s); (2) Gets and sets the underlying string. 1) Creates and returns a std::basic_string object containing a copy of this std::basic_stringbuf's underlying character sequence. For input-only streams, the returned string contains the characters from the range [eback(), egptr()). For input/output or output-only streams, contains the characters fro

std::basic_stringbuf::seekoff

protected: virtual pos_type seekoff(off_type off, ios_base::seekdir dir, ios_base::openmode which = ios_base::in | ios_base::out); Repositions std::basic_streambuf::gptr and/or std::basic_streambuf::pptr, if possible, to the position that corresponds to exactly off characters from beginning, end, or current position of the get and/or put area of the buffer. If which includes ios_base::in and this buffer is open for reading (that is, if