GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::experimental::make_ostream_joiner(3) C++ Standard Libary std::experimental::make_ostream_joiner(3)

std::experimental::make_ostream_joiner - std::experimental::make_ostream_joiner


Defined in header <experimental/iterator>
template <class charT, class traits, class DelimT>


std::experimental::ostream_joiner<std::decay_t<DelimT>, charT, (library
traits> fundamentals TS
v2)
make_ostream_joiner(std::basic_ostream<charT, traits>& os, DelimT&&
delimiter);


Creates an ostream_joiner object, deducing the template arguments from the types of
the function arguments.


os - the basic_ostream object that the iterator is to be associated to
delimiter - the delimiter


A ostream_joiner object, created as if by
std::experimental::ostream_joiner<std::decay_t<DelimT>, charT, traits>(os,
std::forward<DelimT>(delimiter)).

// Run this code


#include <experimental/iterator>
#include <iostream>
#include <vector>


int main() {
std::vector<int> x{1, 2, 3, 4};
std::copy(x.begin(), x.end(),
std::experimental::make_ostream_joiner(std::cout, ", "));
}


1, 2, 3, 4

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.