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

Compile time check if type T has begin() and end() methods. More...

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

Static Public Member Functions

template<typename C >
static char(& f (typename std::enable_if< std::is_same< decltype(static_cast< typename C::const_iterator(C::*)() const >(&C::begin)), typename C::const_iterator(C::*)() const >::value, void >::type *))[1]
 
template<typename C >
static char(& f (...))[2]
 
template<typename C >
static char(& g (typename std::enable_if< std::is_same< decltype(static_cast< typename C::const_iterator(C::*)() const >(&C::end)), typename C::const_iterator(C::*)() const >::value, void >::type *))[1]
 
template<typename C >
static char(& g (...))[2]
 

Static Public Attributes

static bool const beg_value = sizeof(f<T>(0)) == 1
 
static bool const end_value = sizeof(g<T>(0)) == 1
 

Detailed Description

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

Compile time check if type T has begin() and end() methods.

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

Member Function Documentation

◆ f() [1/2]

template<typename T >
template<typename C >
static char(& ns3::has_begin_end< T >::f ( typename std::enable_if< std::is_same< decltype(static_cast< typename C::const_iterator(C::*)() const >(&C::begin)), typename C::const_iterator(C::*)() const >::value, void >::type *  ) )[1]
static

◆ f() [2/2]

template<typename T >
template<typename C >
static char(& ns3::has_begin_end< T >::f (   ...) )[2]
static

◆ g() [1/2]

template<typename T >
template<typename C >
static char(& ns3::has_begin_end< T >::g ( typename std::enable_if< std::is_same< decltype(static_cast< typename C::const_iterator(C::*)() const >(&C::end)), typename C::const_iterator(C::*)() const >::value, void >::type *  ) )[1]
static

◆ g() [2/2]

template<typename T >
template<typename C >
static char(& ns3::has_begin_end< T >::g (   ...) )[2]
static

Member Data Documentation

◆ beg_value

template<typename T >
bool const ns3::has_begin_end< T >::beg_value = sizeof(f<T>(0)) == 1
static

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

◆ end_value

template<typename T >
bool const ns3::has_begin_end< T >::end_value = sizeof(g<T>(0)) == 1
static

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


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