A Discrete-Event Network Simulator
API
ns3::has_const_iterator< T > Struct Template Reference

SFINAE compile time check if type T has const iterator. More...

#include "attribute-container-accessor-helper.h"

+ Collaboration diagram for ns3::has_const_iterator< T >:

Classes

struct  no
 negative result More...
 

Public Types

typedef T type
 Equivalent name of the type T. More...
 

Static Public Attributes

static const bool value = sizeof (test<T> (0)) == sizeof (yes)
 Value of the test - true if type has a const_iterator. More...
 

Private Types

typedef char yes
 positive result More...
 

Static Private Member Functions

template<typename C >
static no test (...)
 Test function, compiled if type does not have a const_iterator. More...
 
template<typename C >
static yes test (typename C::const_iterator *)
 Test function, compiled if type has a const_iterator. More...
 

Detailed Description

template<typename T>
struct ns3::has_const_iterator< T >

SFINAE compile time check if type T has const iterator.

Definition at line 38 of file attribute-container-accessor-helper.h.

Member Typedef Documentation

◆ type

template<typename T >
typedef T ns3::has_const_iterator< T >::type

Equivalent name of the type T.

Definition at line 64 of file attribute-container-accessor-helper.h.

◆ yes

template<typename T >
typedef char ns3::has_const_iterator< T >::yes
private

positive result

Definition at line 42 of file attribute-container-accessor-helper.h.

Member Function Documentation

◆ test() [1/2]

template<typename T >
template<typename C >
static no ns3::has_const_iterator< T >::test (   ...)
staticprivate

Test function, compiled if type does not have a const_iterator.

Returns
A value indicating that this specialization has been compiled.

◆ test() [2/2]

template<typename T >
template<typename C >
static yes ns3::has_const_iterator< T >::test ( typename C::const_iterator *  )
staticprivate

Test function, compiled if type has a const_iterator.

Returns
A value indicating that this specialization has been compiled.

Member Data Documentation

◆ value

template<typename T >
const bool ns3::has_const_iterator< T >::value = sizeof (test<T> (0)) == sizeof (yes)
static

Value of the test - true if type has a const_iterator.

Definition at line 62 of file attribute-container-accessor-helper.h.


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