tuple_rank(3) tuple_rank(3)

NAME

tuple_rank - tuple number of dimensions

SYNOPSIS

#include <cfl/tuple/tuple_rank.hpp>

tuple_rank_t <tuple_c <int,float>> == 1;

tuple_rank_t <
    tuple_c
    <
        tuple_c <int, float>,
        tuple_c <int, double>
    >
>::value == 2;

// dimensionless tuple corner case
tuple_rank <int>::value == 0;

DESCRIPTION

Retreive number of dimensions for a tuple. The tuple must be rectangular, but not homoegeneous. Empty and dimensionless tuples are regarded to have zero rank. As non-tuples are interpreted as dimensionless tuples, they consequently also have zero rank.

RETURN VALUES

A member type type of cfl::natural_t type.

STANDARDS

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