DGtal  0.9.4beta
Public Types | Public Member Functions | Static Public Member Functions
DGtal::detail::HasNestedTypeCategory< T > Struct Template Reference

#include <DGtal/base/ContainerTraits.h>

Public Types

typedef char yes[1]
 
typedef char no[2]
 

Public Member Functions

 BOOST_STATIC_CONSTANT (bool, value=sizeof(test< T >(0))==sizeof(yes))
 

Static Public Member Functions

template<typename C >
static yestest (typename C::Category *)
 
template<typename C >
static notest (...)
 

Detailed Description

template<typename T>
struct DGtal::detail::HasNestedTypeCategory< T >

Aim: Checks whether type T has a nested type called 'Category' or not. NB: from en.wikipedia.org/wiki/Substitution_failure_is_not_an_error NB: to avoid various compiler issues, we use BOOST_STATIC_CONSTANT according to http://www.boost.org/development/int_const_guidelines.html.

Description of template class 'HasNestedTypeCategory'

Template Parameters
Tany type.

Definition at line 223 of file ContainerTraits.h.

Member Typedef Documentation

template<typename T >
typedef char DGtal::detail::HasNestedTypeCategory< T >::no[2]

Definition at line 226 of file ContainerTraits.h.

template<typename T >
typedef char DGtal::detail::HasNestedTypeCategory< T >::yes[1]

Definition at line 225 of file ContainerTraits.h.

Member Function Documentation

template<typename T >
DGtal::detail::HasNestedTypeCategory< T >::BOOST_STATIC_CONSTANT ( bool  ,
value  = sizeof(test< T >(0))==sizeof(yes) 
)
template<typename T >
template<typename C >
static yes& DGtal::detail::HasNestedTypeCategory< T >::test ( typename C::Category *  )
static
template<typename T >
template<typename C >
static no& DGtal::detail::HasNestedTypeCategory< T >::test (   ...)
static

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