#include <iostream>#include <list>#include <string>#include <tuple>#include <type_traits>#include <vector>#include "helpers.h"#include "traits.h"
Go to the source code of this file.
Functions | |
| template<typename T , std::enable_if_t< std::is_integral_v< T >, int > = 0> | |
| void | print_ip (T t, std::ostream &stream=std::cout) |
| Pretty print IP address. More... | |
| template<typename T , std::enable_if_t< is_iterable_v< T > &&!std::is_same_v< T, std::string >, int > = 0> | |
| void | print_ip (T const &t, std::ostream &stream=std::cout) |
| Pretty print IP address. More... | |
| void print_ip | ( | T | t, |
| std::ostream & | stream = std::cout |
||
| ) |
Pretty print IP address.
Overload print integer-valued data as a dot-separated IP address. Octets is bytes of given value.
| t | Integer-valued data. |
| stream | Output stream to push in. |
Print string as is.
| t | C-style string to be printed. |
| stream | Output stream to push in. |
Definition at line 24 of file print_ip.h.


| void print_ip | ( | T const & | t, |
| std::ostream & | stream = std::cout |
||
| ) |
Pretty print IP address.
Print STL-style container as a dot-separated IP address. Every item is an octet.
| t | Iterable with T:begin(), T::end() container. Items can have primitive numeric, C-style or std::string type. |
| stream | Output stream to push in. |
Print tuple as a dot-separated IP address.
| t | Tuple of same typed items. |
| stream | Output stream to push in. |
| static_assert | When items of tuple is not same typed. |
Ref.
Throw.
Print string as is.
| t | std::string to be printed. |
| stream | Output stream to push in. |
Definition at line 54 of file print_ip.h.
