libzypp 17.31.23
zypp::_detail::_has_container_begin_end< Tp > Struct Template Reference

#include <base/TypeTraits.h>

Static Public Attributes

static constexpr bool beg_value = decltype(testBeg<Tp>(nullptr))::value
 
static constexpr bool end_value = decltype(testEnd<Tp>(nullptr))::value
 
static constexpr bool value = beg_value && end_value
 

Private Types

template<typename C >
using Signature = typename C::const_iterator(C::*)() const
 

Static Private Member Functions

template<typename C >
static std::true_type testBeg (typename std::enable_if< std::is_same< decltype(static_cast< Signature< C > >(&C::begin)), Signature< C > >::value, void >::type *)
 
template<typename C >
static std::false_type testBeg (...)
 
template<typename C >
static std::true_type testEnd (typename std::enable_if< std::is_same< decltype(static_cast< Signature< C > >(&C::end)), Signature< C > >::value, void >::type *)
 
template<typename C >
static std::false_type testEnd (...)
 

Detailed Description

template<typename Tp>
struct zypp::_detail::_has_container_begin_end< Tp >

Definition at line 33 of file TypeTraits.h.

Member Typedef Documentation

◆ Signature

template<typename Tp >
template<typename C >
using zypp::_detail::_has_container_begin_end< Tp >::Signature = typename C::const_iterator(C::*)() const
private

Definition at line 37 of file TypeTraits.h.

Member Function Documentation

◆ testBeg() [1/2]

template<typename Tp >
template<typename C >
static std::true_type zypp::_detail::_has_container_begin_end< Tp >::testBeg ( typename std::enable_if< std::is_same< decltype(static_cast< Signature< C > >(&C::begin)), Signature< C > >::value  ,
void  ,
::type *   
)
staticprivate

◆ testBeg() [2/2]

template<typename Tp >
template<typename C >
static std::false_type zypp::_detail::_has_container_begin_end< Tp >::testBeg (   ...)
staticprivate

◆ testEnd() [1/2]

template<typename Tp >
template<typename C >
static std::true_type zypp::_detail::_has_container_begin_end< Tp >::testEnd ( typename std::enable_if< std::is_same< decltype(static_cast< Signature< C > >(&C::end)), Signature< C > >::value  ,
void  ,
::type *   
)
staticprivate

◆ testEnd() [2/2]

template<typename Tp >
template<typename C >
static std::false_type zypp::_detail::_has_container_begin_end< Tp >::testEnd (   ...)
staticprivate

Member Data Documentation

◆ beg_value

template<typename Tp >
constexpr bool zypp::_detail::_has_container_begin_end< Tp >::beg_value = decltype(testBeg<Tp>(nullptr))::value
staticconstexpr

Definition at line 46 of file TypeTraits.h.

◆ end_value

template<typename Tp >
constexpr bool zypp::_detail::_has_container_begin_end< Tp >::end_value = decltype(testEnd<Tp>(nullptr))::value
staticconstexpr

Definition at line 47 of file TypeTraits.h.

◆ value

template<typename Tp >
constexpr bool zypp::_detail::_has_container_begin_end< Tp >::value = beg_value && end_value
staticconstexpr

Definition at line 48 of file TypeTraits.h.


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