SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::type::trait::is_container< T > Struct Template Reference

#include <is_container.h>

Detect if a type T has iterator/const iterator function. More...

Detailed Description

template<typename T>
struct sofa::type::trait::is_container< T >

Detect if a type T has iterator/const iterator function.

Static Public Attributes

static const bool value = test<test_type>(nullptr)
 

Static Public Member Functions

template<typename A >
static constexpr bool test (A *pt, A const *cpt=nullptr, decltype(pt->begin()) *=nullptr, decltype(pt->end()) *=nullptr, decltype(cpt->begin()) *=nullptr, decltype(cpt->end()) *=nullptr, typename A::iterator *=nullptr, typename A::const_iterator *=nullptr, typename A::value_type *=nullptr)
 
template<typename A >
static constexpr bool test (...)
 

Attribute details

◆ value

template<typename T >
const bool sofa::type::trait::is_container< T >::value = test<test_type>(nullptr)
static

Function details

◆ test() [1/2]

template<typename T >
template<typename A >
static constexpr bool sofa::type::trait::is_container< T >::test (   ...)
inlinestaticconstexpr

◆ test() [2/2]

template<typename T >
template<typename A >
static constexpr bool sofa::type::trait::is_container< T >::test ( A *  pt,
A const *  cpt = nullptr,
decltype(pt->begin()) *  = nullptr,
decltype(pt->end()) *  = nullptr,
decltype(cpt->begin()) *  = nullptr,
decltype(cpt->end()) *  = nullptr,
typename A::iterator *  = nullptr,
typename A::const_iterator *  = nullptr,
typename A::value_type *  = nullptr 
)
inlinestaticconstexpr