userver: compiler Namespace Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
compiler Namespace Reference

Compiler and C++ language related tweaks. More...

Classes

class  SelectValue
 Selects the proper value for the current compiler and standard library. More...
 

Typedefs

using SelectSize = SelectValue< std::size_t >
 Alias for std::size_t values selection for the current compiler and standard library.
 

Functions

std::string GetTypeName (std::type_index type)
 Returns a human-readable representation of provided type name.
 
template<typename T >
std::string GetTypeName ()
 Returns a human-readable representation of provided type name.
 

Detailed Description

Compiler and C++ language related tweaks.

Typedef Documentation

◆ SelectSize

using compiler::SelectSize = typedef SelectValue<std::size_t>

Alias for std::size_t values selection for the current compiler and standard library.

Definition at line 107 of file select.hpp.

Function Documentation

◆ GetTypeName()

template<typename T >
std::string compiler::GetTypeName ( )

Returns a human-readable representation of provided type name.

GetTypeName(typeidT)) outputs the type, not the alias. For std::chrono functions it gives unreadable results: std::chrono::duration<long, std::ratio<1l, 1l> > - it's seconds

The GetTypeName<T>() provides a more readable output.

Definition at line 81 of file demangle.hpp.