is_dense_tuple(3) | is_dense_tuple(3) |
is_dense_tuple - dense tuple predicate
#include <cfl/tuple/is_dense_tuple.hpp>
is_dense_tuple <
tuple_c
<
tuple_c <int>,
tuple_c <int, double>
>
>::value == true;
is_dense_tuple <
tuple_c
<
tuple_c <int>,
tuple_c <int, double &>
>
>::value == false;
// dimensionless tuple corner case
is_dense_tuple <int &>::value == true;
Test whether a tuple has dense storage or not. Here, with dense storage is meant no element is of reference type. Elements of pointer type are considered to be dense though. Empty and dimensionless tuples are regarded as dense. As non-tuples are interpreted as dimensionless tuples, they are consequently also dense.
Note the corner case with a non-tuple of reference type, which is considered as a dense tuple. The case for this is the predicate inspecting tuple elements, not the tuple itself.
A member type type
of cfl::predicate type.
A standard CFL type factory, with the trailing underscore omitted.