is_homogeneous_tuple(3) | is_homogeneous_tuple(3) |
is_homogeneous_tuple - homogeneous tuple elements predicate
#include <cfl/tuple/is_homogeneous_tuple.hpp>
is_homogeneous_tuple <
tuple_c
<
tuple_c <int>,
tuple_c <int, int>
>
>::value == true;
is_homogeneous_tuple <
tuple_c
<
tuple_c <int>,
tuple_c <int, double>
>
>::value == false;
// dimensionless tuple corner case
is_homogeneous_tuple <int>::value == true;
Test whether a tuple is homogeneous or not, i.e. whether all elements are of the same type. The tuple does not need to be rectangular, only its terminal (or leaf) elements are compared. Empty and dimensionless tuples are regarded as homogeneous. As non-tuples are interpreted as dimensionless tuples, they are consequently also homogeneous.
A member type type
of cfl::predicate type.
A standard CFL type factory, with the trailing underscore omitted.