|
ZeroErr
|
A functor class Printer for printing a value of any type. 更多...
#include <print.h>

Public 成员函数 | |
| template<typename... Args> | |
| Printer & | operator() (Args &&... args) |
| template<typename T > | |
| Printer & | operator() (std::initializer_list< T > &&value) |
| void | check_stream () |
| template<typename T , typename... V> | |
| void | call (T &&value, V &&... others) |
| template<typename T > | |
| void | call (T &&value) |
| Printer () | |
| template<class Stream > | |
| Printer (Stream &stream) | |
| Printer (const Printer &other) | |
| print (const T &value, unsigned level, const char *lb, rank< 0 >) | |
| print (const T &value, unsigned level, const char *lb, rank< 0 >) | |
| ZEROERR_ENABLE_IF (ZEROERR_IS_POINTER &&!std::is_function< typename std::remove_pointer< T >::type >::value) print(const T &value | |
静态 Public 成员函数 | |
| template<class T > | |
| static zeroerr::String | type (const T &t) |
Public 属性 | |
| bool | isColorful = true |
| bool | isCompact = false |
| bool | isQuoted = true |
| int | indent = 2 |
| const char * | line_break = "\n" |
| StringBuffer & | os |
| bool | use_stringstream = false |
| bool | clear_stream_before_printing = true |
| unsigned | level |
| unsigned const char * | lb |
| unsigned const char | rank< 0 > |
A functor class Printer for printing a value of any type.
This class can print values with all basic types, pointers, STL containers, tuple, optional, and variant values. Any class that is streamable can be printed. POD structs can be supported using third-party library Boost.PFR and enum can be supported using magic_enum.
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
| zeroerr::Printer::ZEROERR_ENABLE_IF | ( | ZEROERR_IS_POINTER &&!std::is_function< typename std::remove_pointer< T >::type >::value | ) | const & |
| bool zeroerr::Printer::clear_stream_before_printing = true |
| int zeroerr::Printer::indent = 2 |
| bool zeroerr::Printer::isColorful = true |
| bool zeroerr::Printer::isCompact = false |
| bool zeroerr::Printer::isQuoted = true |
| unsigned const char* zeroerr::Printer::lb |
| unsigned zeroerr::Printer::level |
| const char* zeroerr::Printer::line_break = "\n" |
| StringBuffer& zeroerr::Printer::os |
| unsigned const char zeroerr::Printer::rank< 0 > |
| bool zeroerr::Printer::use_stringstream = false |