|
gbase
|
Lightweight CRTP base class that provides a pre-configured logger to derived types. More...


Go to the source code of this file.
Data Structures | |
| class | GBase< Derived > |
| CRTP base class that provides logging facilities to the derived class. More... | |
Functions | |
| std::string | demangle (const char *name) |
| Fallback demangle implementation for non-GNU toolchains. | |
This header defines:
typeid(T).name()) into more readable strings when supported.Design goals:
std::shared_ptr.Notes on demangling:
__GNUG__ (GNU-compatible toolchains), demangling uses abi::__cxa_demangle from <cxxabi.h>.Definition in file gbase.h.
| std::string demangle | ( | const char * | name | ) |
On compilers/platforms where GNU-style demangling is not available, this function simply returns the input string unchanged.
This is a deliberate portability choice: the calling code can rely on the function existing everywhere, while still benefiting from readable names where supported.
| name | A mangled type name, usually produced by typeid(T).name(). |
name (no demangling performed).