PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::TypeInfo< T > Struct Template Reference

Type information. More...

#include <TypeInfo.hpp>

Collaboration diagram for playrho::TypeInfo< T >:
[legend]

Static Public Attributes

static constexpr const char * name = detail::GetNameForTypeInfo<T>()
 The name of the templated type. More...
 

Detailed Description

template<typename T>
struct playrho::TypeInfo< T >

Type information.

Note
Users may specialize this for their own types.

Member Data Documentation

◆ name

template<typename T >
constexpr const char* playrho::TypeInfo< T >::name = detail::GetNameForTypeInfo<T>()
staticconstexpr

The name of the templated type.

Note
This is also a static member providing a unique ID, via its address, for the type T without resorting to using C++ run-time type information (RTTI).
Setting this to a null-terminated byte string that's unique to at least the template's type T prevents issue #370. Credit for this technique goes to Li Jin (github user pigpigyyy).
See also
https://github.com/louis-langholtz/PlayRho/issues/370

The documentation for this struct was generated from the following file: