cxxomfort  rel.20210622
Simple backports for C++ - http://ryan.gulix.cl/fossil.cgi/cxxomfort/
Namespaces | Classes | Functions
cxxomfort::library Namespace Reference

Supplements to backports and other utilities. Namespace that holds the library's own implementations, emulations and supplements. More...

Namespaces

 numeric
 Supplements to the standard utilities in <numeric>.
 

Classes

struct  is_indexable_like_array
 Type identification trait for types that are indexable via an array-like operator[]. More...
 
struct  is_iterator
 Type identification trait for iterator types as defined by the <iterator> interface. More...
 
struct  is_sequence
 Type identification trait for sequence-like types: More...
 
struct  is_std_array
 Type identification trait for std::array<...> types. More...
 

Functions

static std::string typeid_demangle (std::type_info const &ti)
 Demangle a typeid() expression if demangling is available. More...
 
template<typename T >
std::string_view type_name () CXXO_NOEXCEPTNOTHROW
 Demangle a typename, recovering information about const / volatile too. More...
 

Detailed Description

Supplements to backports and other utilities. Namespace that holds the library's own implementations, emulations and supplements.

Function Documentation

◆ typeid_demangle()

static std::string cxxomfort::library::typeid_demangle ( std::type_info const &  ti)
inlinestatic

Demangle a typeid() expression if demangling is available.

Returns
A demangled version of a typeid(...) return, if available.

Referenced by type_name().

◆ type_name()

std::string_view cxxomfort::library::type_name ( )

Demangle a typename, recovering information about const / volatile too.

Returns
An implementation-defined string containing a type name depending on the type T used to instantiate the function.

Example usage:

#include <typeinfo>
...
cout<< cxxomfort::library::type_name<int>()<< endl;