DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions
DGtal::detail::HasNestedTypeCategory< T > Struct Template Reference

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

#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

◆ no

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

Definition at line 226 of file ContainerTraits.h.

◆ yes

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

Definition at line 225 of file ContainerTraits.h.

Member Function Documentation

◆ BOOST_STATIC_CONSTANT()

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

◆ test() [1/2]

template<typename T >
template<typename C >
static no & DGtal::detail::HasNestedTypeCategory< T >::test (   ...)
static

◆ test() [2/2]

template<typename T >
template<typename C >
static yes & DGtal::detail::HasNestedTypeCategory< T >::test ( typename C::Category *  )
static

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