11#ifndef ZYPP_TYPETRAITS_H
12#define ZYPP_TYPETRAITS_H
26 template<
typename C>
static std::true_type
test(
typename C::const_iterator * );
27 template<
typename C>
static std::false_type
test(...);
32 template <
typename Tp>
37 using Signature =
typename C::const_iterator(C::*)()
const;
40 template<
typename C>
static std::false_type
testBeg(...);
43 template<
typename C>
static std::false_type
testEnd(...);
56 :
public std::integral_constant<bool, _detail::has_type_const_iterator<Tp>::value>
62 :
public std::integral_constant<bool, _detail::_has_container_begin_end<Tp>::value>
68 :
public std::integral_constant<bool, !std::is_same<Tp, std::string>::value && has_container_begin_end<Tp>::value>
Easy-to use interface to the ZYPP dependency resolver.
static std::false_type testBeg(...)
typename C::const_iterator(C::*)() const Signature
static constexpr bool end_value
static std::false_type testEnd(...)
static constexpr bool value
static std::true_type testEnd(typename std::enable_if< std::is_same< decltype(static_cast< Signature< C > >(&C::end)), Signature< C > >::value, void >::type *)
static constexpr bool beg_value
static std::true_type testBeg(typename std::enable_if< std::is_same< decltype(static_cast< Signature< C > >(&C::begin)), Signature< C > >::value, void >::type *)
static std::false_type test(...)
static std::true_type test(typename C::const_iterator *)
static constexpr bool value
Whether Tp defines methods Tp::const_iterator begin/end() const
Whether Tp defines type Tp::const_iterator.
Whether Tp is a container (begin/end iterabel, but not plain std::string)