#include <iostream>
#include <string>
#include <tuple>
Go to the source code of this file.
|
|
template<typename T > |
std::string | to_string (T t) |
| Wrapper function to make string. More...
|
|
std::string | to_string (char ch) |
| Wrapper function to make string. More...
|
|
std::string | to_string (const char *ch) |
| Wrapper function to make string. More...
|
|
std::string | to_string (std::string const &s) |
| Wrapper function to make string. More...
|
|
template<typename T1 , typename T2 > |
void | print_ip_tuple_impl (std::tuple< T1, T2 > const &t, std::ostream &stream=std::cout) |
| Pretty print IP address. More...
|
|
template<typename Head , typename ... Tail> |
void | print_ip_tuple_impl (std::tuple< Head, Tail ... > const &t, std::ostream &stream=std::cout) |
| Pretty print IP address. Print tuple as a dot-separated IP address. More...
|
|
◆ print_ip_tuple_impl() [1/2]
template<typename T1 , typename T2 >
void print_ip_tuple_impl |
( |
std::tuple< T1, T2 > const & |
t, |
|
|
std::ostream & |
stream = std::cout |
|
) |
| |
|
private |
Pretty print IP address.
Print pair as a dot-separated IP address.
- Parameters
-
t | Tuple of two same typed items. |
stream | Output stream to push in. |
- Exceptions
-
static_assert | When items of tuple is not same typed. |
Definition at line 59 of file helpers.h.
◆ print_ip_tuple_impl() [2/2]
template<typename Head , typename ... Tail>
void print_ip_tuple_impl |
( |
std::tuple< Head, Tail ... > const & |
t, |
|
|
std::ostream & |
stream = std::cout |
|
) |
| |
|
private |
Pretty print IP address. Print tuple as a dot-separated IP address.
- Parameters
-
t | Tuple of same typed items. |
stream | Output stream to push in. |
- Exceptions
-
static_assert | When items of tuple is not same typed. |
Definition at line 73 of file helpers.h.
◆ to_string() [1/4]
template<typename T >
std::string to_string |
( |
T |
t | ) |
|
|
private |
Wrapper function to make string.
Function needs to uniformely get string from various types.
- Parameters
-
t | Any object that can be converted with std::string. |
- Returns
- String made from arg..
Definition at line 17 of file helpers.h.
◆ to_string() [2/4]
std::string to_string |
( |
char |
ch | ) |
|
|
private |
Wrapper function to make string.
Function needs to uniformely get string from various types.
- Parameters
-
- Returns
- String containing given symbol.
Definition at line 27 of file helpers.h.
◆ to_string() [3/4]
std::string to_string |
( |
const char * |
ch | ) |
|
|
private |
Wrapper function to make string.
Function needs to uniformely get string from various types.
- Parameters
-
- Returns
- std::string constructed from given C-string.
Definition at line 37 of file helpers.h.
◆ to_string() [4/4]
std::string to_string |
( |
std::string const & |
s | ) |
|
|
private |
Wrapper function to make string.
Function needs to uniformely get string from various types.
- Parameters
-
- Returns
- Copy of input string.
Definition at line 47 of file helpers.h.