DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::detail::HasNestedTypeType< IC > Struct Template Reference

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. More...

#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

◆ no

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

Definition at line 79 of file IteratorCirculatorTraits.h.

◆ yes

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

Definition at line 78 of file IteratorCirculatorTraits.h.

Member Function Documentation

◆ BOOST_STATIC_CONSTANT()

template<typename IC >
DGtal::detail::HasNestedTypeType< IC >::BOOST_STATIC_CONSTANT ( bool ,
value = sizeof(test< IC >(0))==sizeof(yes) )

◆ test() [1/2]

template<typename IC >
template<typename C >
static no & DGtal::detail::HasNestedTypeType< IC >::test ( ...)
static

◆ test() [2/2]

template<typename IC >
template<typename C >
static yes & DGtal::detail::HasNestedTypeType< IC >::test ( typename C::Type * )
static

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