Chombo + EB + MF  3.2
Classes | Public Types | Private Types | Static Private Member Functions | List of all members
Misc::TypeTr< T > Class Template Reference

Test for class type. More...

#include <Misc.H>

Classes

struct  Two
 

Public Types

enum  { IsClass = sizeof(TypeTr<T>::template test<T>(0)) == 1 }
 
enum  { IsClass = sizeof(TypeTr<T>::template test<T>(0)) == 1 }
 

Private Types

typedef char One
 
typedef char One
 

Static Private Member Functions

template<typename C >
static One test (int C::*)
 
template<typename C >
static Two test (...)
 
template<typename C >
static One test (int C::*)
 
template<typename C >
static Two test (...)
 

Detailed Description

template<typename T>
class Misc::TypeTr< T >

Test for class type.

Use the SFINAE principle as described in 15.2.2 "Determining Class Types" in Vandevoorde and Josuttis "C++ Templates" book to see if T is class type. E.g., TypeTr<int>::IsClass == false TypeTr<Box>::IsClass == true

Member Typedef Documentation

◆ One [1/2]

template<typename T >
typedef char Misc::TypeTr< T >::One
private

◆ One [2/2]

template<typename T >
typedef char Misc::TypeTr< T >::One
private

Member Enumeration Documentation

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
IsClass 

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
IsClass 

Member Function Documentation

◆ test() [1/4]

template<typename T >
template<typename C >
static One Misc::TypeTr< T >::test ( int C::*  )
staticprivate

◆ test() [2/4]

template<typename T >
template<typename C >
static Two Misc::TypeTr< T >::test (   ...)
staticprivate

◆ test() [3/4]

template<typename T >
template<typename C >
static One Misc::TypeTr< T >::test ( int C::*  )
staticprivate

◆ test() [4/4]

template<typename T >
template<typename C >
static Two Misc::TypeTr< T >::test (   ...)
staticprivate

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