17 #ifndef AWALI_IS_ITERABLE_HXX
18 #define AWALI_IS_ITERABLE_HXX
29 template <
typename T,
typename P>
33 std::begin(std::declval<T&>()) != std::end(std::declval<T&>()),
35 ++std::declval<decltype(std::begin(std::declval<T&>()))&>(),
36 void(*std::begin(std::declval<T&>())),
40 template <
typename T,
typename P>
57 template <
bool... Tail>
58 struct std_all<false, Tail...> : std::false_type {};
60 template <
bool... Tail>
74 template <
typename T,
typename X,
typename P>
76 ->
typename std::enable_if<
79 decltype(*std::begin(std::declval<T&>())), X
85 template <
typename T,
typename X,
typename P>
96 template <
typename T,
typename X>
auto is_iterable_aux1(priority::TOP< P >) -> decltype(std::begin(std::declval< T & >()) !=std::end(std::declval< T & >()), void(),++std::declval< decltype(std::begin(std::declval< T & >()))& >(), void(*std::begin(std::declval< T & >())), std::true_type{})
auto is_iterable_aux2(priority::TOP< P >) -> typename std::enable_if< std_all< is_iterable< T >::value, std::is_convertible< decltype(*std::begin(std::declval< T & >())), X >::value >::value, std::true_type >::type
Definition: is_iterable.hxx:52
static constexpr TOP< void > value
Definition: priority.hh:93
Definition: priority.hh:52
Main namespace of Awali.
Definition: ato.hh:22
decltype(internal::is_iterable_aux2< T, X >(priority::value)) is_iterable_with
Trait to test whether type T can be iterated over and assign its values to type X.
Definition: is_iterable.hxx:97
decltype(internal::is_iterable_aux1< T >(priority::value)) is_iterable
Trait to test whether type T can be iterated over.
Definition: is_iterable.hxx:47