std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator (3) - Linux Manuals
std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator: std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator
Command to display std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator
manual in Linux: $ man 3 std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator
NAME
std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator - std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator
Synopsis
ostreambuf_iterator( streambuf_type* buffer ) throw(); (until C++11)
ostreambuf_iterator( streambuf_type* buffer ) noexcept; (1) (since C++11)
ostreambuf_iterator( ostream_type& stream ) throw(); (2) (until C++11)
ostreambuf_iterator( ostream_type& stream ) noexcept; (since C++11)
1) Constructs the iterator with the private streambuf_type* member set to buffer and the failed() bit set to false. The behavior is undefined if buffer is a null pointer.
2) Same as ostreambuf_iterator(stream.rdbuf())
Parameters
stream - the output stream whose rdbuf() will be accessed by this iterator
buffer - the output stream buffer to be accessed by this iterator
Example
// Run this code
#include <iostream>
#include <fstream>
#include <iterator>
int main()
{
std::basic_filebuf<char> f;
f.open("test.txt", std::ios::out);
std::ostreambuf_iterator<char> out1(&f);
std::ostreambuf_iterator<wchar_t> out2(std::wcout);
*out1 = 'a';
*out2 = L'a';
}
Pages related to std::ostreambuf_iterator<CharT,Traits>::ostreambuf_iterator
- std::ostreambuf_iterator<CharT,Traits>::operator++ (3) - std::ostreambuf_iterator<CharT,Traits>::operator++
- std::ostreambuf_iterator<CharT,Traits>::operator= (3) - std::ostreambuf_iterator<CharT,Traits>::operator=
- std::ostreambuf_iterator<CharT,Traits>::failed (3) - std::ostreambuf_iterator<CharT,Traits>::failed
- std::ostreambuf_iterator (3) - std::ostreambuf_iterator
- std::ostream (3) - std::basic_ostream
- std::ostream_iterator (3) - std::ostream_iterator
- std::ostream_iterator<T,CharT,Traits>::operator++ (3) - std::ostream_iterator<T,CharT,Traits>::operator++
- std::ostream_iterator<T,CharT,Traits>::operator= (3) - std::ostream_iterator<T,CharT,Traits>::operator=
- std::ostream_iterator<T,CharT,Traits>::ostream_iterator (3) - std::ostream_iterator<T,CharT,Traits>::ostream_iterator
- std::ostream_iterator<T,CharT,Traits>::~ostream_iterator (3) - std::ostream_iterator<T,CharT,Traits>::~ostream_iterator
- std::ostringstream (3) - std::basic_ostringstream
- std::ostringstream::operator= (3) - std::basic_ostringstream::operator=
- std::ostringstream::rdbuf (3) - std::basic_ostringstream::rdbuf