ttg::iostream Namespace Reference

Functions

I/O operators for standard types
template<typename T >
std::ostream & operator<< (std::ostream &s, const std::complex< T > &c)
 default printing of std::complex More...
 
template<typename T , typename U >
std::ostream & operator<< (std::ostream &s, const std::pair< T, U > &p)
 default printing of std::pair More...
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const std::vector< T > &c)
 default printing of std::vector More...
 
template<typename T , std::size_t N>
std::enable_if<!std::is_same< T, char >::value, std::ostream & >::type operator<< (std::ostream &s, const std::array< T, N > &v)
 default printing of std::array More...
 
template<typename T , std::size_t N>
std::enable_if<!std::is_same< T, char >::value, std::ostream & >::type operator<< (std::ostream &s, const T(&v)[N])
 default printing of fixed dimension arrays. More...
 

Function Documentation

◆ operator<<() [1/5]

template<typename T , std::size_t N>
std::enable_if<!std::is_same<T, char>::value, std::ostream &>::type ttg::iostream::operator<< ( std::ostream &  s,
const std::array< T, N > &  v 
)

default printing of std::array

STL I/O already does char (thus the enable_if business).

Template Parameters
TType of data in the array.
NSize of the array.
Parameters
[in,out]sThe output stream.
[in]vThe array.
Returns
The output stream (for chaining).

Definition at line 76 of file print.h.

◆ operator<<() [2/5]

template<typename T >
std::ostream& ttg::iostream::operator<< ( std::ostream &  s,
const std::complex< T > &  c 
)

default printing of std::complex

Template Parameters
TThe "real" type of the complex number.
Parameters
[in,out]sThe output stream.
[in]cThe complex number.
Returns
The output stream (for chaining).

Definition at line 29 of file print.h.

◆ operator<<() [3/5]

template<typename T , typename U >
std::ostream& ttg::iostream::operator<< ( std::ostream &  s,
const std::pair< T, U > &  p 
)

default printing of std::pair

Template Parameters
TType 1 of the pair.
UType 2 of the pair.
Parameters
[in,out]sThe output stream.
[in]pThe pair.
Returns
The output stream (for chaining).

Definition at line 42 of file print.h.

◆ operator<<() [4/5]

template<typename T >
std::ostream& ttg::iostream::operator<< ( std::ostream &  s,
const std::vector< T > &  c 
)

default printing of std::vector

Template Parameters
TType stored in the vector.
Parameters
[in,out]sThe output stream.
[in]cThe vector.
Returns
The output stream (for chaining).

Definition at line 54 of file print.h.

◆ operator<<() [5/5]

template<typename T , std::size_t N>
std::enable_if<!std::is_same<T, char>::value, std::ostream &>::type ttg::iostream::operator<< ( std::ostream &  s,
const T(&)  v[N] 
)

default printing of fixed dimension arrays.

STL I/O already does char (thus the enable_if business).

Template Parameters
TType of data in the array.
NSize of the array.
Parameters
[in,out]sThe output stream.
[in]vThe array.
Returns
The output stream (for chaining).

Definition at line 97 of file print.h.