Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Macro BOOST_VMD_GET_TYPE

BOOST_VMD_GET_TYPE — Returns the type of a sequence as a VMD type.

Synopsis

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

BOOST_VMD_GET_TYPE(...)

Description

... = 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.


PrevUpHomeNext