Home work №3 "C++ Developer. Professional" OTUS
0.0.1
|
#include <list>
#include <iostream>
#include <string>
#include <vector>
#include <tuple>
#include <type_traits>
#include <experimental/iterator>
Go to the source code of this file.
Classes | |
class | tmp_::Integral_type_printer< T, class > |
Namespaces | |
tmp_ | |
Macros | |
#define | _PRETTY_ __PRETTY_FUNCTION__ |
#define | DEBUG_MODE(x) (x) |
Typedefs | |
template<typename T > | |
using | tmp_::enable_integral_t = std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, bool > > |
template<typename T , template< typename > class Cont> | |
using | tmp_::enable_containers_t = std::enable_if_t< std::is_same_v< std::decay_t< Cont< T > >, std::vector< T > >||std::is_same_v< std::decay_t< Cont< T > >, std::list< T > >> |
template<typename T > | |
using | tmp_::enable_string_t = std::enable_if_t< std::is_same_v< std::decay_t< T >, std::string > > |
template<typename T , typename... Tail> | |
using | tmp_::enable_all_the_same_t = std::enable_if_t< std::conjunction_v< std::is_same< T, Tail >... > > |
Functions | |
template<typename T , typename ... Ts> | |
void | tmp_::print_args (std::ostream &cur_stream, const T &first_arg, const Ts &...tail_args) |
template<typename ... Ts> | |
std::ostream & | tmp_::operator<< (std::ostream &cur_stream, const std::tuple< Ts... > &in_parameter) |
template<typename T > | |
tmp_::enable_string_t< T > | generator_ip (const T ¶m_) |
Printing some IP address implementation for a std::string. More... | |
template<typename T > | |
tmp_::enable_integral_t< T > | generator_ip (const T &in_param) |
Printing some IP-address implementation for integral types. More... | |
template<typename T , template< typename > class Cont> | |
tmp_::enable_containers_t< T, Cont > | generator_ip (const Cont< T > ¶m_) |
Printing some IP-address implimentation for std::vector and std::list. More... | |
template<typename T , typename... Tail> | |
tmp_::enable_all_the_same_t< T, Tail... > | generator_ip (const std::tuple< T, Tail... > &in_param) |
Printing some IP-address implimentation for a std::tuple. More... | |
#define _PRETTY_ __PRETTY_FUNCTION__ |
#define DEBUG_MODE | ( | x | ) | (x) |
tmp_::enable_containers_t<T, Cont> generator_ip | ( | const Cont< T > & | param_ | ) |
Printing some IP-address implimentation for std::vector and std::list.
Turns on when an input argument of std::vector and std::list types.
The contents of the container are displayed sequentially, separated by the '.' character.
tmp_::enable_all_the_same_t<T, Tail...> generator_ip | ( | const std::tuple< T, Tail... > & | in_param | ) |
Printing some IP-address implimentation for a std::tuple.
Turns on when an input argument of std::tuple type has all elements of the same type.
The contents of the container are displayed sequentially, separated by the '.' character.
tmp_::enable_integral_t<T> generator_ip | ( | const T & | in_param | ) |
Printing some IP-address implementation for integral types.
Turns on when an input argument of integral type, except for bool type.
The content of the type is displayed bit by bit, starting with the most significant, separated by the '.' character.
tmp_::enable_string_t<T> generator_ip | ( | const T & | param_ | ) |
Printing some IP address implementation for a std::string.
Fires with an input argument of type std::string.
As a result, the content of the string is displayed as is.