Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::experi...ream_joiner(3)  C++ Standard Libary std::experi...ream_joiner(3)

NAME
       std::experimental::make_ostream_joiner	-  std::experimental::make_os-
       tream_joiner

Synopsis
	  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
	      make_ostream_joiner(   std::basic_ostream<CharT,	 Traits>&  os,
       v2)

				   DelimT&& delimiter );

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

Parameters
	  os	     - the basic_ostream object	that the iterator is to	be as-
       sociated	to
	  delimiter - the delimiter

Return value
	  An ostream_joiner object, created as if by
	  std::experimental::ostream_joiner<std::decay_t<DelimT>,	CharT,
       Traits>(os,
	  std::forward<DelimT>(delimiter))

Example
       // 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,	    ",
       "));
	}

Output:
	1, 2, 3, 4

http://cppreference.com		  2024.06.10	  std::experi...ream_joiner(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::experimental::make_ostream_joiner&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help