|
Console Library 8.0.0
A header-only library that makes C++ simple
|
提供类型名称和值的可读表示。 More...
Functions | |
| std::string | console::tiname_impl (const std::type_info &ti) |
| 获取类型信息的可读名称(跨平台 demangle),返回 std::string。 | |
| std::string | console::tiname (const std::type_info &ti) |
| tiname_impl 的 char 版别名。 | |
| std::wstring | console::wtiname (const std::type_info &ti) |
| tiname_impl 的 wchar_t 版。 | |
| template<class T, class CharT = char, class Traits = std::char_traits<CharT>> | |
| std::enable_if< is_string< typenamestd::decay< T >::type >::value >::type | console::repr (T &&value, std::basic_ostream< CharT, Traits > &os=std::cout) |
| 输出字符串类型(std::string, const char* 等)的表示,带双引号。 | |
| template<class CharT, class Traits, class Ret, class... Args> | |
| void | console::repr (Ret(*f)(Args...), std::basic_ostream< CharT, Traits > &os=std::cout) |
| 输出函数指针的表示,格式为 "<function at 地址>"。 | |
| template<class T, class CharT = char, class Traits = std::char_traits<CharT>> | |
| void | console::repr (std::reference_wrapper< T > v, std::basic_ostream< CharT, Traits > &os=std::cout) |
提供类型名称和值的可读表示。
| void console::repr | ( | Ret(* | f )(Args...), |
| std::basic_ostream< CharT, Traits > & | os = std::cout ) |
输出函数指针的表示,格式为 "<function at 地址>"。
| CharT | 流的字符类型。 |
| Traits | 流的字符特征类型。 |
| Ret | 函数返回类型。 |
| Args | 函数参数类型包。 |
| f | 函数指针。 |
| os | 输出流。 |
| void console::repr | ( | std::reference_wrapper< T > | v, |
| std::basic_ostream< CharT, Traits > & | os = std::cout ) |
| std::enable_if< is_string< typenamestd::decay< T >::type >::value >::type console::repr | ( | T && | value, |
| std::basic_ostream< CharT, Traits > & | os = std::cout ) |
输出字符串类型(std::string, const char* 等)的表示,带双引号。
| CharT | 流的字符类型。 |
| Traits | 流的字符特征类型。 |
| T | 字符串类型(由 enable_if_string 约束)。 |
| value | 要输出的值。 |
| os | 输出流,默认为 std::cout。 |
|
inline |
tiname_impl 的 char 版别名。
|
inline |
获取类型信息的可读名称(跨平台 demangle),返回 std::string。
| ti | std::type_info 对象。 |
|
inline |
tiname_impl 的 wchar_t 版。