|
tgen
|
Printer helper for standard types. More...

Public Member Functions | |
| template<typename T> | |
| print (const T &val, char sep=' ') | |
| Cretes a printer object. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const print &pr) |
| Prints printer object. | |
Printer helper for standard types.
Just call std::cout << tgen::print(x) to print x, or std::cout << tgen::println(x) to print x and \n. Works with std::initializer_list.
Prints std::pair, std::tuple and containers nicely (separade by a space). Matrices (container<container<T>>) are also handleled nicely, printing one row per line.
|
inline |
|
friend |