ZFFramework
 
Loading...
Searching...
No Matches
zftTraits< T_Type > Class Template Reference

type traits similar to STL's traits More...

#include <ZFCoreUtilTemplate.h>

Public Types

enum  { TrIsPtr , TrIsRef , TrModifier }
 
typedef T_Type TrType
 normal type
 
typedef T_Type & TrRef
 reference type
 
typedef T_Type const & TrConstRef
 const reference type
 
typedef T_Type * TrPtr
 pointer type
 
typedef const T_Type * TrConstPtr
 const pointer type
 
typedef T_Type TrNoRef
 remove reference
 

Static Public Member Functions

static const zfcharModifierName (void)
 type modifier name
 

Detailed Description

template<typename T_Type>
class zftTraits< T_Type >

type traits similar to STL's traits

Note
this is a walkaround to reduce dependency of STL, no rvalue reference support

Member Enumeration Documentation

◆ anonymous enum

template<typename T_Type>
anonymous enum
Enumerator
TrIsRef 

true if the type is pointer type

TrModifier 

true if the type is reference type

Member Function Documentation

◆ ModifierName()

template<typename T_Type>
static const zfchar * zftTraits< T_Type >::ModifierName ( void )
inlinestatic

type modifier name

  • 'N' : Type
  • 'R' : Type &
  • 'CR' : Type const &
  • 'P' : Type *
  • 'PR' : Type *&
  • 'PCR' : Type * const &
  • 'CP' : const Type *
  • 'CPR' : const Type *&
  • 'CPCR' : const Type * const &

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