DGtal  0.9.3beta
Public Types | Public Member Functions | Static Public Member Functions
DGtal::detail::HasNestedTypeType< IC > Struct Template Reference

#include <DGtal/base/IteratorCirculatorTraits.h>

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

template<typename IC>
struct DGtal::detail::HasNestedTypeType< IC >

Aim: Checks whether type IC has a nested type called 'Type' 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 'HasNestedTypeType'

Template Parameters
ICany iterator or circulator

Definition at line 76 of file IteratorCirculatorTraits.h.

Member Typedef Documentation

template<typename IC >
typedef char DGtal::detail::HasNestedTypeType< IC >::no[2]

Definition at line 79 of file IteratorCirculatorTraits.h.

template<typename IC >
typedef char DGtal::detail::HasNestedTypeType< IC >::yes[1]

Definition at line 78 of file IteratorCirculatorTraits.h.

Member Function Documentation

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

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