#include <samples/samples_types_printer.hpp>
Public Member Functions | |
| TypesPrinter (OStream &os) | |
| TypesPrinter (const TypesPrinter &)=default | |
| TypesPrinter (TypesPrinter &&)=default | |
| template<class T> | |
| const TypesPrinter & | print () const |
| template<class T> | |
| const TypesPrinter & | print (T &&) const |
| template<class T> | |
| const TypesPrinter & | operator() () const |
The type name is the first of these expressions which is valid:
typeid(T).name()` */ template<typename T> inline auto getTypeName() { using Access = _samples::TypeNameAccess; ugmisc::static_member_value<Access, T> value_get;
return ugmisc::static_member_caller<Access, T>::fallback([&]() { If we are here, Calling sTypeName() failed. So we try to get the value of sTypeName. And finally fall back to typeid(U).name(). return value_get.get([]() { return typeid(T).name(); }); })(); }
/** Prints the list of type parameters, given a type which is itself an instance of a template with those type parameters.
The name of a single type is obtained using getTypeName().
Definition at line 64 of file samples_types_printer.hpp.
|
inline |
Definition at line 129 of file samples_types_printer.hpp.
|
inline |
Definition at line 146 of file samples_types_printer.hpp.
|
inline |
Definition at line 134 of file samples_types_printer.hpp.
|
inline |
Definition at line 141 of file samples_types_printer.hpp.