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

#include <is_vector.h>

Detect if a type T has iterator/const iterator function and operator[](size_t) More...

Detailed Description

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

Detect if a type T has iterator/const iterator function and operator[](size_t)

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 std::decay< decltype((*pt)[0])>::type *=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_vector< 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_vector< T >::test (   ...)
inlinestaticconstexpr

◆ test() [2/2]

template<typename T >
template<typename A >
static constexpr bool sofa::type::trait::is_vector< 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 std::decay< decltype((*pt)[0])>::type *  = nullptr,
typename A::iterator *  = nullptr,
typename A::const_iterator *  = nullptr,
typename A::value_type *  = nullptr 
)
inlinestaticconstexpr