PlayRho  2.0.0
An interactive physics engine & library.
playrho::detail::TypeInfo< T > Struct Template Reference

Type information. More...

#include <playrho/detail/TypeInfo.hpp>

Static Public Attributes

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

Detailed Description

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

Type information.

Note
Users may specialize this to provide an alternative name for a type so long as the provided name is still non-empty and unique for the application otherwise behavior is not specified.

Member Data Documentation

◆ name

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

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: