InheritConst< T, INHERIT_FROM > Class Template Reference

#include <apibase.h>

Detailed Description

template<typename T, typename INHERIT_FROM>
class maxon::InheritConst< T, INHERIT_FROM >

This transformation type trait can be used to add a const qualifier to a type T only if another type INHERIT_FROM also has this qualifier. InheritConst<T, S>::type will be T if S has no top-level const qualifier, const T otherwise.

Template Parameters
TType to which a const qualifier shall be added conditionally.
INHERIT_FROMAnother type from which the const qualifier shall be inherited.

Public Types

using type = T

Member Typedef Documentation

◆ type

using type = T

The result type, either T or const T.