| Home | Libraries | People | FAQ | More

## Macro BOOST_VMD_GET_TYPE_D

BOOST_VMD_GET_TYPE_D — Returns the type of a sequence as a VMD type. Re-entrant version.

## Synopsis

    // In header: <boost/vmd/get_type.hpp>

    BOOST_VMD_GET_TYPE_D(d, ...)

## Description

d = The next available BOOST_PP_WHILE iteration.
... = variadic parameters.

The first variadic parameter is required and is the sequence whose type we are getting.

The optional variadic parameters are return type parameters.

The macro returns the type of a sequence as a VMD type. The type of an empty sequence is always BOOST_VMD_TYPE_EMPTY and the type of a multi-element is always BOOST_VMD_TYPE_SEQUENCE. The type of a single-element sequence is the type of that single element.

The type returned can be modified by specifying an optional return type parameter.

If BOOST_VMD_RETURN_TYPE, the default, is specified the specific type of the element is returned.

If BOOST_VMD_RETURN_TYPE_ARRAY is specified an array type is returned if the element is an array, else a tuple type is returned if the element is a tuple, else the actual type is returned for non-tuple data.

If BOOST_VMD_RETURN_TYPE_LIST is specified a list type is returned if the element is a list, else a tuple type is returned if the element is a tuple, else the actual type is returned for non-tuple data.

If BOOST_VMD_RETURN_TYPE_TUPLE is specified a tuple type is returned for all tuple-like data, else the actual type is returned for non-tuple data.

If BOOST_VMD_RETURN_NO_TYPE is specified it is ignored since the macro always returns the type of the sequence.

If more than one return type optional parameter is specified the last one specified determines the return type.

returns = the type of the sequence as a VMD type.