is_dense_tuple(3) is_dense_tuple(3)

NAME

is_dense_tuple - dense tuple predicate

SYNOPSIS

#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;

DESCRIPTION

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.

RETURN VALUES

A member type type of cfl::predicate type.

STANDARDS

A standard CFL type factory, with the trailing underscore omitted.