← comparison
tgen
Loading...
Searching...
No Matches

Printer helper for standard types, printing on a new line. More...

Inheritance diagram for tgen::println:

Public Member Functions

template<typename T>
 println (const T &val, char sep=' ')
 Creates a printer object that prints on a new line.
Public Member Functions inherited from tgen::print
template<typename T>
 print (const T &val, char sep=' ')
 Creates a printer object.

Friends

std::ostream & operator<< (std::ostream &out, const println &pr)
 Prints printer object on a new line.

Detailed Description

Printer helper for standard types, printing on a new line.

Same as print, but prints on a new line (appending a
at the end).

Examples

std::tuple<int, double, std::string> tu = {5, 0.1, "str"};
std::cout << tgen::println(tu);
std::cout << tgen::print({{1, 2}, {3, 4}}, ',');
Printer helper for standard types.
Definition tgen.h:485
Printer helper for standard types, printing on a new line.
Definition tgen.h:587
5 0.1 str
1,2
3,4
String generator.
Definition tgen.h:3693

Definition at line 587 of file tgen.h.

Constructor & Destructor Documentation

◆ println()

template<typename T>
tgen::println::println ( const T & val,
char sep = ' ' )
inline

Creates a printer object that prints on a new line.

Parameters
valValue to be printed.
sepSeparator for values printed in the same line.

Definition at line 589 of file tgen.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const println & pr )
friend

Prints printer object on a new line.

Parameters
outStream to print to.
prPrinter object.

Definition at line 598 of file tgen.h.


The documentation for this struct was generated from the following files:
  • /home/runner/work/tgen_vs_jngen/tgen_vs_jngen/vendor/tgen/single_include/tgen.h
  • base.dox