# Variadic Macro Data Reference

converts an array to a seq.

array = array to be converted.

If the array is an array of 0 elements it is converted to an empty seq. Otherwise the array is converted to a seq with the same number of elements as the array.

converts a list to a seq.

list = list to be converted.

If the list is an empty list (BOOST_PP_NIL) it is converted to an empty seq. Otherwise the list is converted to a seq with the same number of elements as the list.

Converts a sequence to a Boost PP seq whose elements are the elements of the sequence.

... = Variadic parameters.

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP seq. If the sequence is empty the return is emptiness since an empty seq does not exist. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the seq element. Otherwise just the data is returned as the seq element, which is the default.

Converts a sequence to a Boost PP seq whose elements are the elements of the sequence. Re-entrant version.

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

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP seq. If the sequence is empty the return is emptiness since an empty seq does not exist. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the seq element. Otherwise just the data is returned as the seq element, which is the default.

converts a tuple to a seq.

tuple = tuple to be converted.

If the tuple is an empty tuple it is converted to an empty seq. Otherwise the tuple is converted to a seq with the same number of elements as the tuple.

converts an array to a tuple.

array = array to be converted.

If the array is an array of 0 elements it is converted to an empty tuple. Otherwise the array is converted to a tuple with the same number of elements as the array.

converts a list to a tuple.

list = list to be converted.

If the list is an empty list (BOOST_PP_NIL) it is converted to an empty tuple. Otherwise the list is converted to a tuple with the same number of elements as the list.

converts a seq to a tuple.

seq = seq to be converted.

If the seq is an empty seq it is converted to an empty tuple. Otherwise the seq is converted to a tuple with the same number of elements as the seq.

Converts a sequence to a Boost PP tuple whose elements are the elements of the sequence.

... = Variadic parameters.

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP tuple. If the sequence is empty the return is emptiness since an empty tuple does not exist. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the tuple element. Otherwise just the data is returned as the tuple element, which is the default.

Converts a sequence to a Boost PP tuple whose elements are the elements of the sequence. Re-entrant version.

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

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP tuple. If the sequence is empty the return is emptiness since an empty tuple does not exist. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the tuple element. Otherwise just the data is returned as the tuple element, which is the default.

Conditionally causes an error to be generated.

... = variadic parameters, maximum of 2 will be considered. Any variadic parameters beyond the maximum of 2 are just ignored.

The first variadic parameter is:

cond = A condition that determines whether an assertion occurs. Valid values range from 0 to BOOST_PP_LIMIT_MAG.

The second variadic parameter (optional) is:

errstr = An error string for generating a compiler error when using the VC++ compiler. The VC++ compiler is incapable of producing a preprocessor error so when the 'cond' is 0, a compiler error is generated by outputting C++ code in the form of:

typedef char errstr[-1];

The errstr defaults to BOOST_VMD_ASSERT_ERROR if not supplied. It is only relevant for VC++.

returns = If cond expands to 0, this macro causes an error. Otherwise, it expands to nothing. For all compilers other than Visual C++ the error is a preprocessing error. For Visual C++ the error is caused by output invalid C++: this error could be masked if the invalid output is ignored by a macro which invokes this macro.

Asserts that the sequence is a Boost PP array.

The macro checks that the sequence is a Boost PP array. If it is not a Boost PP array, it forces a compiler error.

The macro normally checks for a Boost PP array only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

sequence = a possible Boost PP array.

returns = Normally the macro returns nothing. If the sequence is a Boost PP array, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP array the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a Boost PP array.

Asserts that the sequence is a Boost PP array. Re-entrant version.

The macro checks that the sequence is a Boost PP array. If it is not a Boost PP array, it forces a compiler error.

The macro normally checks for a Boost PP array only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible Boost PP sequence.

returns = Normally the macro returns nothing. If the sequence is a Boost PP array, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP array the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a Boost PP array.

Asserts that the input is empty.

The macro checks to see if the input is empty or not. If it is not empty, it forces a compiler error.

The macro is a variadic macro taking any input. For the VC++8 compiler (VS2005) the macro takes a single parameter of input to check and not variadic data.

The macro normally checks for emptiness only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

.... = variadic input, for VC++8 this must be a single parameter.

returns = Normally the macro returns nothing. If the input is empty, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the input is not empty the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the input is not empty.

It is recommended to append BOOST_PP_EMPTY() to whatever input is being tested in order to avoid possible warning messages from some compilers about no parameters being passed to the macro when the input is truly empty.

Asserts that the sequence is an identifier.

The macro checks that the sequence is an identifier. If it is not an identifier, it forces a compiler error.

The macro normally checks for an identifier only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

... = variadic parameters

The variadic parameters are:

sequence = A sequence to test as an identifier. ids (optional) = The data may take one of two forms: it is either one or more single identifiers or a single Boost PP tuple of identifiers.

returns = Normally the macro returns nothing. If the sequence is an identifier, nothing is output. If optional ids are specified, for the sequence to be an identifier it must be an identifier that matches one of the optional ids.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not an identifier the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not an identifier.

Identifiers are registered in VMD with: #define BOOST_VMD_REG_XXX (XXX) where XXX is a v-identifier.

The identifier must be registered to be found.

Identifiers are pre-detected in VMD with: #define BOOST_VMD_DETECT_XXX_XXX where XXX is an identifier.

If you specify optional ids and have not specified the detection of an optional id, that id will never match an identifier.

Asserts that the sequence is an identifier. Re-entrant version.

The macro checks that the sequence is an identifier. If it is not an identifier, it forces a compiler error.

The macro normally checks for an identifier only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

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

The variadic parameters are:

sequence = A sequence to test as an identifier. ids (optional) = The data may take one of two forms: it is either one or more single identifiers or a single Boost PP tuple of identifiers.

returns = Normally the macro returns nothing. If the sequence is an identifier, nothing is output. If optional ids are specified, for the sequence to be an identifier it must be an identifier that matches one of the optional ids.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not an identifier the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not an identifier.

Identifiers are registered in VMD with: #define BOOST_VMD_REG_XXX (XXX) where XXX is a v-identifier.

The identifier must be registered to be found.

Identifiers are pre-detected in VMD with: #define BOOST_VMD_DETECT_XXX_XXX where XXX is an identifier.

If you specify optional ids and have not specified the detection of an optional id, that id will never match an identifier.

Asserts that the sequence is a Boost PP list.

The macro checks that the sequence is a Boost PP list. If it is not a Boost PP list, it forces a compiler error.

The macro normally checks for a Boost PP list only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

sequence = a possible Boost PP list.

returns = Normally the macro returns nothing. If the sequence is a Boost PP list, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP list the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the parameter is not a Boost PP list.

Asserts that the sequence is a Boost PP list. Re-entrant version.

The macro checks that the sequence is a Boost PP list. If it is not a Boost PP list, it forces a compiler error.

The macro normally checks for a Boost PP list only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible Boost PP list.

returns = Normally the macro returns nothing. If the sequence is a Boost PP list, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP list the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the parameter is not a Boost PP list.

Asserts that the sequence is a number.

The macro checks that the parameter is a number. If it is not a number, it forces a compiler error.

The macro normally checks for a number only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

sequence = a possible number.

returns = Normally the macro returns nothing. If the sequence is a number, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a number the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a number.

Asserts that the sequence is a Boost PP seq.

The macro checks that the sequence is a Boost PP seq. If it is not a Boost PP seq, it forces a compiler error.

The macro normally checks for a Boost PP seq only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

sequence = a possible Boost PP seq.

returns = Normally the macro returns nothing. If the sequence is a Boost PP seq, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP seq the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a Boost PP seq.

Asserts that the sequence is a Boost PP seq. Re-entrant version.

The macro checks that the sequence is a Boost PP seq. If it is not a Boost PP seq, it forces a compiler error.

The macro normally checks for a Boost PP seq only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible Boost PP seq.

returns = Normally the macro returns nothing. If the sequence is a Boost PP seq, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP seq the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a Boost PP seq.

Asserts that the sequence is a Boost PP tuple.

The macro checks that the sequence is a Boost PP tuple. If it is not a Boost PP tuple, it forces a compiler error.

The macro normally checks for a Boost PP tuple only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

sequence = a possible Boost PP tuple.

returns = Normally the macro returns nothing. If the sequence is a Boost PP tuple, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a Boost PP tuple the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a Boost PP tuple.

Asserts that the sequence is a VMD type.

The macro checks that the sequence is a VMD type. If it is not a VMD type, it forces a compiler error.

The macro normally checks for a VMD type only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

sequence = a possible VMD type.

returns = Normally the macro returns nothing. If the sequence is a VMD type, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a VMD type the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a VMD type.

Asserts that the sequence is a VMD type. Re-entrant version.

The macro checks that the sequence is a VMD type. If it is not a VMD type, it forces a compiler error.

The macro normally checks for a VMD type only in debug mode. However an end-user can force the macro to check or not check by defining the macro BOOST_VMD_ASSERT_DATA to 1 or 0 respectively.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible VMD type.

returns = Normally the macro returns nothing. If the sequence is a VMD type, nothing is output.

For VC++, because there is no sure way of forcing a compiler error from within a macro without producing output, if the sequence is not a VMD type the macro forces a compiler error by outputting invalid C++.

For all other compilers a compiler error is forced without producing output if the sequence is not a VMD type.

Accesses an element of a sequence.

elem = A sequence element number. From 0 to sequence size - 1. ... = Variadic parameters.

The first variadic parameter is required and is the sequence to access. Further variadic parameters are all optional.

With no further variadic parameters the macro returns the particular element in the sequence. If the element number is outside the bounds of the sequence macro access fails and the macro turns emptiness.

Optional parameters determine what it means that an element is successfully accessed as well as what data is returned by the macro.

Filters: specifying a VMD type tells the macro to return the element only if it is of the VMD type specified, else macro access fails. If more than one VMD type is specified as an optional parameter the last one specified is the filter.

Matching Identifiers: If the filter is specified as the identifier type, BOOST_VMD_TYPE_IDENTIFIER, optional parameters which are identifiers specify that the element accessed must match one of the identifiers else access fails. The identifiers may be specified multiple times as single optional parameters or once as a tuple of identifier parameters. If the identifiers are specified as single optional parameters they cannot be any of the specific BOOST_VMD_ optional parameters in order to be recognized as matching identifiers. Normally this should never be the case. The only situation where this could occur is if the VMD types, which are filters, are used as matching identifiers; in this case the matching identifiers need to be passed as a tuple of identifier parameters so they are not treated as filters.

Filters and matching identifiers change what it means that an element is successfully accessed. They do not change what data is returned by the macro. The remaining optional parameters do not change what it means that an element is successfully accessed but they do change what data is returned by the macro.

Splitting: Splitting allows the macro to return the rest of the sequence after the element accessed.

If BOOST_VMD_RETURN_AFTER is specified the return is a tuple with the element accessed as the first tuple parameter and the rest of the sequence as the second tuple parameter. If element access fails both tuple parameters are empty.

If BOOST_VMD_RETURN_ONLY_AFTER is specified the return is the rest of the sequence after the element accessed found. If the element access fails the return is emptiness.

If BOOST_VMD_RETURN_NO_AFTER, the default, is specified no splitting occurs.

If more than one of the splitting identifiers are specified the last one specified determines the splitting.

Return Type: The element accessed can be changed to return both the type of the element as well as the element data with optional return type parameters. When a type is returned, the element accessed which is returned becomes a two-element tuple where the type of the element accessed is the first tuple element and the element data itself is the second tuple element. If the macro fails to access the element the element access returned is emptiness and not a tuple.

If BOOST_VMD_RETURN_NO_TYPE, the default, is specified no type is returned as part of the element accessed.

If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple.

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 more than one return type optional parameter is specified the last one specified determines the return type.

If a filter is specified optional return type parameters are ignored and the default BOOST_VMD_RETURN_NO_TYPE is in effect.

Index: If the filter is specified as the identifier type, BOOST_VMD_TYPE_IDENTIFIER, and matching identifiers are specified, an index parameter specifies that the numeric index, starting with 0, of the matching identifier found, be returned as part of the result.

If BOOST_VMD_RETURN_INDEX is specified an index is returned as part of the result.

If BOOST_VMD_RETURN_NO_INDEX, the default, is specified no index is returned as part of the result.

If both are specified the last one specified determines the index parameter.

When an index is returned as part of the result, the result is a tuple where the element accessed is the first tuple parameter and the index is the last tuple parameter. If element access fails the index is empty. If there is no BOOST_VMD_TYPE_IDENTIFIER filter or if there are no matching identifiers the BOOST_VMD_RETURN_INDEX is ignored and no index is returned as part of the result.

returns = With no optional parameters the element accessed is returned, or emptiness if element is outside the bounds of the sequence. Filters and matching identifiers can change the meaning of whether the element accessed is returned or failure occurs, but whenever failure occurs emptiness is returned as the element access part of that failure, else the element accessed is returned. Return type optional parameters, when filters are not used, return the element accessed as a two-element tuple where the first tuple element is the type and the second tuple element is the data; if the element is not accessed then emptiness is returned as the element access and not a tuple. Splitting with BOOST_VMD_RETURN_AFTER returns a tuple where the element accessed is the first tuple element and the rest of the sequence is the second tuple element. Splitting with BOOST_VMD_RETURN_ONLY_AFTER returns the rest of the sequence after the element accessed or emptiness if the element can not be accessed. Indexing returns the index as part of the output only if filtering with BOOST_VMD_TYPE_IDENTIFIER is specified and matching identifiers are specified. When the index is returned with BOOST_VMD_RETURN_AFTER it is the third element of the tuple returned, else it is the second element of a tuple where the element accessed is the first element of the tuple.

Accesses an element of a sequence. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. elem = A sequence element number. From 0 to sequence size - 1. ... = Variadic parameters.

The first variadic parameter is required and is the sequence to access. Further variadic parameters are all optional.

With no further variadic parameters the macro returns the particular element in the sequence. If the element number is outside the bounds of the sequence macro access fails and the macro turns emptiness.

Optional parameters determine what it means that an element is successfully accessed as well as what data is returned by the macro.

Filters: specifying a VMD type tells the macro to return the element only if it is of the VMD type specified, else macro access fails. If more than one VMD type is specified as an optional parameter the last one specified is the filter.

Matching Identifiers: If the filter is specified as the identifier type, BOOST_VMD_TYPE_IDENTIFIER, optional parameters which are identifiers specify that the element accessed must match one of the identifiers else access fails. The identifiers may be specified multiple times as single optional parameters or once as a tuple of identifier parameters. If the identifiers are specified as single optional parameters they cannot be any of the specific BOOST_VMD_ optional parameters in order to be recognized as matching identifiers. Normally this should never be the case. The only situation where this could occur is if the VMD types, which are filters, are used as matching identifiers; in this case the matching identifiers need to be passed as a tuple of identifier parameters so they are not treated as filters.

Filters and matching identifiers change what it means that an element is successfully accessed. They do not change what data is returned by the macro. The remaining optional parameters do not change what it means that an element is successfully accessed but they do change what data is returned by the macro.

Splitting: Splitting allows the macro to return the rest of the sequence after the element accessed.

If BOOST_VMD_RETURN_AFTER is specified the return is a tuple with the element accessed as the first tuple parameter and the rest of the sequence as the second tuple parameter. If element access fails both tuple parameters are empty.

If BOOST_VMD_RETURN_ONLY_AFTER is specified the return is the rest of the sequence after the element accessed found. If the element access fails the return is emptiness.

If BOOST_VMD_RETURN_NO_AFTER, the default, is specified no splitting occurs.

If more than one of the splitting identifiers are specified the last one specified determines the splitting.

Return Type: The element accessed can be changed to return both the type of the element as well as the element data with optional return type parameters. When a type is returned, the element accessed which is returned becomes a two-element tuple where the type of the element accessed is the first tuple element and the element data itself is the second tuple element. If the macro fails to access the element the element access returned is emptiness and not a tuple.

If BOOST_VMD_RETURN_NO_TYPE, the default, is specified no type is returned as part of the element accessed.

If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple.

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 more than one return type optional parameter is specified the last one specified determines the return type.

If a filter is specified optional return type parameters are ignored and the default BOOST_VMD_RETURN_NO_TYPE is in effect.

Index: If the filter is specified as the identifier type, BOOST_VMD_TYPE_IDENTIFIER, and matching identifiers are specified, an index parameter specifies that the numeric index, starting with 0, of the matching identifier found, be returned as part of the result.

If BOOST_VMD_RETURN_INDEX is specified an index is returned as part of the result.

If BOOST_VMD_RETURN_NO_INDEX, the default, is specified no index is returned as part of the result.

If both are specified the last one specified determines the index parameter.

When an index is returned as part of the result, the result is a tuple where the element accessed is the first tuple parameter and the index is the last tuple parameter. If element access fails the index is empty. If there is no BOOST_VMD_TYPE_IDENTIFIER filter or if there are no matching identifiers the BOOST_VMD_RETURN_INDEX is ignored and no index is returned as part of the result.

returns = With no optional parameters the element accessed is returned, or emptiness if element is outside the bounds of the sequence. Filters and matching identifiers can change the meaning of whether the element accessed is returned or failure occurs, but whenever failure occurs emptiness is returned as the element access part of that failure, else the element accessed is returned. Return type optional parameters, when filters are not used, return the element accessed as a two-element tuple where the first tuple element is the type and the second tuple element is the data; if the element is not accessed then emptiness is returned as the element access and not a tuple. Splitting with BOOST_VMD_RETURN_AFTER returns a tuple where the element accessed is the first tuple element and the rest of the sequence is the second tuple element. Splitting with BOOST_VMD_RETURN_ONLY_AFTER returns the rest of the sequence after the element accessed or emptiness if the element can not be accessed. Indexing returns the index as part of the output only if filtering with BOOST_VMD_TYPE_IDENTIFIER is specified and matching identifiers are specified. When the index is returned with BOOST_VMD_RETURN_AFTER it is the third element of the tuple returned, else it is the second element of a tuple where the element accessed is the first element of the tuple.

Outputs emptiness.

... = any variadic parameters. The parameters are ignored.

This macro is used to output emptiness ( nothing ) no matter what is passed to it.

If you use this macro to return a result, as in 'result BOOST_VMD_EMPTY' subsequently invoked, you should surround the result with BOOST_VMD_IDENTITY_RESULT to smooth over a VC++ problem.

Converts a sequence to comma-separated elements which are the elements of the sequence.

... = Variadic parameters.

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = Comma-separated data, otherwise known as variadic data. If the sequence is empty the variadic data is empty. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as part of the variadic data. Otherwise just the data of each element is returned, which is the default.

Converts a sequence to comma-separated elements which are the elements of the sequence. Re-entrant version.

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

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = Comma-separated data, otherwise known as variadic data. If the sequence is empty the variadic data is empty. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as part of the variadic data. Otherwise just the data of each element is returned, which is the default.

Tests any two sequences for equality.

sequence = First sequence. ... = variadic parameters, maximum of 2.

The first variadic parameter is required and is the second sequence to test. The optional second variadic parameter is a VMD type as a filter.

The macro tests any two sequences for equality. For sequences to be equal the VMD types of each sequence must be equal and the individual elements of the sequence must be equal. For Boost PP composite types the macro tests that the composite types have the same size and then tests that each element of the composite type is equal. This means that all elements of a composite type must be a VMD type in order to use this macro successfully.

The single optional parameter is a filter. The filter is a VMD type which specifies that both sequences to test must be of that VMD type, as well as being equal to each other, for the test to succeed.

returns = 1 upon success or 0 upon failure. Success means that both sequences are equal and, if the optional parameter is specified, that the sequences are of the optional VMD type.

Tests any two sequences for equality. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. sequence = First sequence. ... = variadic parameters, maximum of 2.

The first variadic parameter is required and is the second sequence to test. The optional second variadic parameter is a VMD type as a filter.

The macro tests any two sequences for equality. For sequences to be equal the VMD types of each sequence must be equal and the individual elements of the sequence must be equal. For Boost PP composite types the macro tests that the composite types have the same size and then tests that each element of the composite type is equal. This means that all elements of a composite type must be a VMD type in order to use this macro successfully.

The single optional parameter is a filter. The filter is a VMD type which specifies that both sequences to test must be of that VMD type, as well as being equal to each other, for the test to succeed.

returns = 1 upon success or 0 upon failure. Success means that both sequences are equal and, if the optional parameter is specified, that the sequences are of the optional VMD type.

Returns the type of a sequence as a VMD type.

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

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

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.

Macro which expands to its argument when invoked with any number of parameters.

item = any single argument

When BOOST_VMD_IDENTITY(item) is subsequently invoked with any number of parameters it expands to 'item'. Subsequently invoking the macro is done as 'BOOST_VMD_IDENTITY(item)(zero_or_more_arguments)'.

The macro is equivalent to the Boost PP macro BOOST_PP_IDENTITY(item) with the difference being that BOOST_PP_IDENTITY(item) is always invoked with no arguments, as in 'BOOST_VMD_IDENTITY(item)()' whereas BOOST_VMD_IDENTITY can be invoked with any number of arguments.

The macro is meant to be used in BOOST_PP_IF and BOOST_PP_IIF statements when only one of the clauses needs to be invoked with calling another macro and the other is meant to return an 'item'.

returns = the macro as 'BOOST_VMD_IDENTITY(item)', when invoked with any number of parameters as in '(zero_or_more_arguments)', returns 'item'. The macro itself returns 'item BOOST_VMD_EMPTY'.

Macro which wraps any result which can return its value using BOOST_VMD_IDENTITY or 'item BOOST_VMD_EMPTY'.

result = any single result returned when BOOST_VMD_IDENTITY is used or 'item BOOST_VMD_EMPTY'.

The reason for this macro is to smooth over a problem when using VC++ with BOOST_VMD_IDENTITY. If your BOOST_VMD_IDENTITY macro can be used where VC++ is the compiler then you need to surround your macro code which could return a result with this macro in order that VC++ handles BOOST_VMD_IDENTITY correctly.

If you are not using VC++ you do not have to use this macro, but doing so does no harm.

Determines if a sequence is a Boost PP array.

The macro checks that the sequence is a Boost PP array. It returns 1 if it is an array, else if returns 0.

sequence = a possible Boost PP array.

returns = 1 if it is an array, else returns 0.

The macro will generate a preprocessing error if the input is in the form of an array but its first tuple element, instead of being a number, is a preprocessor token which VMD cannot parse, as in the example '(&2,(0,1))' which is a valid tuple but an invalid array.

Determines if a sequence is a Boost PP array. Re-entrant version.

The macro checks that the sequence is a Boost PP array. It returns 1 if it is an array, else if returns 0.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible Boost PP array.

returns = 1 if it is an array, else returns 0.

The macro will generate a preprocessing error if the input is in the form of an array but its first tuple element, instead of being a number, is a preprocessor token which VMD cannot parse, as in the example '(&2,(0,1))' which is a valid tuple but an invalid array.

Tests whether its input is empty or not.

The macro checks to see if the input is empty or not. It returns 1 if the input is empty, else returns 0.

The macro is a variadic macro taking any input. For the VC++8 compiler (VS2005) the macro takes a single parameter of input to check.

The macro is not perfect, and can not be so. The problem area is if the input to be checked is a function-like macro name, in which case either a compiler error can result or a false result can occur.

This macro is a replacement, using variadic macro support, for the undocumented macro BOOST_PP_IS_EMPTY in the Boost PP library. The code is taken from a posting by Paul Mensonides of a variadic version for BOOST_PP_IS_EMPTY, and changed in order to also support VC++.

.... = variadic input, for VC++8 this must be a single parameter

returns = 1 if the input is empty, 0 if it is not

It is recommended to append BOOST_PP_EMPTY() to whatever input is being tested in order to avoid possible warning messages from some compilers about no parameters being passed to the macro when the input is truly empty.

Tests whether a sequence is an empty Boost PP array.

An empty Boost PP array is a two element tuple where the first size element is 0 and the second element is a tuple with a single empty element, ie. '(0,())'.

sequence = a possible empty array

returns = 1 if the sequence is an empty Boost PP array 0 if it is not.

The macro will generate a preprocessing error if the sequence is in the form of an array but its first tuple element, instead of being a number, is a preprocessor token which VMD cannot parse, as in the example '(&0,())' which is a valid tuple but an invalid array.

Tests whether a sequence is an empty Boost PP array. Re-entrant version.

An empty Boost PP array is a two element tuple where the first size element is 0 and the second element is a tuple with a single empty element, ie. '(0,())'.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible empty array

returns = 1 if the sequence is an empty Boost PP array 0 if it is not.

The macro will generate a preprocessing error if the sequence is in the form of an array but its first tuple element, instead of being a number, is a preprocessor token which VMD cannot parse, as in the example '(&0,())' which is a valid tuple but an invalid array.

Tests whether a sequence is an empty Boost PP list.

An empty Boost PP list consists of the single identifier 'BOOST_PP_NIL'. This identifier also serves as a list terminator for a non-empty list.

sequence = a preprocessor parameter

returns = 1 if the sequence is an empty Boost PP list 0 if it is not.

The macro will generate a preprocessing error if the input as an empty list marker, instead of being an identifier, is a preprocessor token which VMD cannot parse, as in the example '&BOOST_PP_NIL'.

Tests whether a sequence is an empty Boost PP list. Re-entrant version.

An empty Boost PP list consists of the single identifier 'BOOST_PP_NIL'. This identifier also serves as a list terminator for a non-empty list.

d = The next available BOOST_PP_WHILE iteration sequence = a preprocessor parameter

returns = 1 if the sequence is an empty Boost PP list 0 if it is not.

The macro will generate a preprocessing error if the input as an empty list marker, instead of being an identifier, is a preprocessor token which VMD cannot parse, as in the example '&BOOST_PP_NIL'.

Tests whether a parameter is an identifier.

... = variadic parameters

The first variadic parameter is required and it is the input to test.

Further variadic parameters are optional and are identifiers to match. The data may take one of two forms; it is either one or more single identifiers or a single Boost PP tuple of identifiers.

returns = 1 if the parameter is an identifier, otherwise 0. If the parameter is not an identifier, or if optional identifiers are specified and the identifier does not match any of the optional identifiers, the macro returns 0.

Identifiers are registered in VMD with: #define BOOST_VMD_REG_XXX (XXX) where XXX is a v-identifier.

The identifier must be registered to be found.

Identifiers are pre-detected in VMD with: #define BOOST_VMD_DETECT_XXX_XXX where XXX is an identifier.

If you specify optional identifiers and have not specified the detection of an optional identifier, that optional identifier will never match the input.

If the input is not a VMD data type this macro could lead to a preprocessor error. This is because the macro uses preprocessor concatenation to determine if the input is an identifier once it is determined that the input does not start with parenthesis. If the data being concatenated would lead to an invalid preprocessor token the compiler can issue a preprocessor error.

Tests whether a parameter is an identifier. Re-entrant version.

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

The first variadic parameter is required and it is the input to test.

Further variadic parameters are optional and are identifiers to match. The data may take one of two forms; it is either one or more single identifiers or a single Boost PP tuple of identifiers.

returns = 1 if the parameter is an identifier, otherwise 0. If the parameter is not an identifier, or if optional identifiers are specified and the identifier does not match any of the optional identifiers, the macro returns 0.

Identifiers are registered in VMD with: #define BOOST_VMD_REG_XXX (XXX) where XXX is a v-identifier.

The identifier must be registered to be found.

Identifiers are pre-detected in VMD with: #define BOOST_VMD_DETECT_XXX_XXX where XXX is an identifier.

If you specify optional identifiers and have not specified the detection of an optional identifier, that optional identifier will never match the input.

If the input is not a VMD data type this macro could lead to a preprocessor error. This is because the macro uses preprocessor concatenation to determine if the input is an identifier once it is determined that the input does not start with parenthesis. If the data being concatenated would lead to an invalid preprocessor token the compiler can issue a preprocessor error.

Determines if a sequence is a Boost pplib list.

The macro checks that the sequence is a pplib list. It returns 1 if it is a list, else if returns 0.

sequence = input as a possible Boost PP list.

returns = 1 if it a list, else returns 0.

The macro will generate a preprocessing error if the input is in the form of a list but its end-of-list marker, instead of being an identifier, is a preprocessor token which VMD cannot parse, as in the example '(anything,&BOOST_PP_NIL)' which is a valid tuple but an invalid list.

Determines if a sequence is a Boost pplib list. Re-entrant version.

The macro checks that the sequence is a pplib list. It returns 1 if it is a list, else if returns 0.

d = The next available BOOST_PP_WHILE iteration. sequence = input as a possible Boost PP list.

returns = 1 if it a list, else returns 0.

The macro will generate a preprocessing error if the input is in the form of a list but its end-of-list marker, instead of being an identifier, is a preprocessor token which VMD cannot parse, as in the example '(anything,&BOOST_PP_NIL)' which is a valid tuple but an invalid list.

Determines if the sequence has more than one element, referred to as a multi-element sequence.

sequence = a sequence

returns = 1 if the sequence is a multi-element sequence, else returns 0.

If the size of a sequence is known it is faster comparing that size to be greater than one to find out if the sequence is multi-element. But if the size of the sequence is not known it is faster calling this macro than getting the size and doing the previously mentioned comparison in order to determine if the sequence is multi-element or not.

Determines if the sequence has more than one element, referred to as a multi-element sequence.

d = The next available BOOST_PP_WHILE iteration. sequence = a sequence

returns = 1 if the sequence is a multi-element sequence, else returns 0.

If the size of a sequence is known it is faster comparing that size to be greater than one to find out if the sequence is multi-element. But if the size of the sequence is not known it is faster calling this macro than getting the size and doing the previously mentioned comparison in order to determine if the sequence is multi-element or not.

Tests whether a sequence is a Boost PP number.

The macro checks to see if a sequence is a Boost PP number. A Boost PP number is a value from 0 to 256.

sequence = a possible number

returns = 1 if the sequence is a Boost PP number, 0 if it is not.

If the input is not a VMD data type this macro could lead to a preprocessor error. This is because the macro uses preprocessor concatenation to determine if the input is a number once it is determined that the input does not start with parenthesis. If the data being concatenated would lead to an invalid preprocessor token the compiler can issue a preprocessor error.

Determines if the sequence is a set of parens with no data.

sequence = a VMD sequence

returns = 1 if the sequence is a set of parens with no data, else returns 0.

A set of parens with no data may be:

1) a tuple whose size is a single element which is empty or

2) a single element seq whose data is empty

Determines if the sequence is a set of parens with no data. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. sequence = a VMD sequence

returns = 1 if the sequence is a set of parens with no data, else returns 0.

A set of parens with no data may be:

1) a tuple whose size is a single element which is empty or

2) a single element seq whose data is empty

Determines if a sequence is a Boost PP seq.

The macro checks that the sequence is a Boost PP seq. It returns 1 if it is a seq, else if returns 0.

sequence = a possible Boost PP seq

returns = 1 if it a seq, else returns 0.

A single set of parentheses, with a single element, is parsed as a tuple and not a seq. To be parsed as a seq the input needs to be more than one consecutive sets of parentheses, each with a single element of data.

Determines if a sequence is a Boost PP seq. Re-entrant version.

The macro checks that the sequence is a Boost PP seq. It returns 1 if it is a seq, else if returns 0.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible Boost PP seq

returns = 1 if it a seq, else returns 0.

A single set of parentheses, with a single element, is parsed as a tuple and not a seq. To be parsed as a seq the input needs to be more than one consecutive sets of parentheses, each with a single element of data.

Tests whether a sequence is a Boost PP tuple.

The macro checks to see if a sequence is a Boost PP tuple. A Boost PP tuple is preprocessor tokens enclosed by a set of parentheses with no preprocessing tokens before or after the parentheses.

sequence = a possible tuple

returns = 1 if the sequence is a Boost PP tuple. 0 if it is not.

Tests whether a sequence is a VMD type.

sequence = a possible VMD type

returns = 1 if the sequence is a VMD type, 0 if it is not.

If the sequence is not a VMD data type this macro could lead to a preprocessor error. This is because the macro uses preprocessor concatenation to determine if the sequence is an identifier once it is determined that the sequence does not start with parentheses. If the data being concatenated would lead to an invalid preprocessor token the compiler can issue a preprocessor error.

Tests whether a sequence is a VMD type. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. sequence = a possible VMD type

returns = 1 if the sequence is a VMD type, 0 if it is not.

If the sequence is not a VMD data type this macro could lead to a preprocessor error. This is because the macro uses preprocessor concatenation to determine if the sequence is an identifier once it is determined that the sequence does not start with parentheses. If the data being concatenated would lead to an invalid preprocessor token the compiler can issue a preprocessor error.

Determines if the sequence has only a single element, referred to as a single-element sequence.

sequence = a VMD sequence

returns = 1 if the sequence is a single-element sequence, else returns 0.

If the size of a sequence is known it is faster comparing that size to be equal to one to find out if the sequence is single-element. But if the size of the sequence is not known it is faster calling this macro than getting the size and doing the previously mentioned comparison in order to determine if the sequence is single-element or not.

Determines if the sequence has only a single element, referred to as a single-element sequence. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. sequence = a sequence

returns = 1 if the sequence is a single-element sequence, else returns 0.

If the size of a sequence is known it is faster comparing that size to be equal to one to find out if the sequence is single-element. But if the size of the sequence is not known it is faster calling this macro than getting the size and doing the previously mentioned comparison in order to determine if the sequence is single-element or not.

Tests any two sequences for inequality.

sequence = First sequence. ... = variadic parameters, maximum of 2.

The first variadic parameter is required and is the second sequence to test. The optional second variadic parameter is a VMD type as a filter.

The macro tests any two sequences for inequality. For sequences to be unequal either the VMD types of each sequence must be unequal or the individual elements of the sequence must be unequal.

The single optional parameter is a filter. The filter is a VMD type which specifies that both sequences to test must be of that VMD type, as well as being equal to each other, for the test to fail, else it succeeds.

returns = 1 upon success or 0 upon failure. Success means that the sequences are unequal or, if the optional parameter is specified, that the sequences are not of the optional VMD type; otherwise 0 is returned if the sequences are equal.

The macro is implemented as the complement of BOOST_VMD_EQUAL, so that whenever BOOST_VMD_EQUAL would return 1 the macro returns 0 and whenever BOOST_VMD_EQUAL would return 0 the macro would return 1.

Tests any two sequences for inequality. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. sequence = First sequence. ... = variadic parameters, maximum of 2.

The first variadic parameter is required and is the second sequence to test. The optional second variadic parameter is a VMD type as a filter.

The macro tests any two sequences for inequality. For sequences to be unequal either the VMD types of each sequence must be unequal or the individual elements of the sequence must be unequal.

The single optional parameter is a filter. The filter is a VMD type which specifies that both sequences to test must be of that VMD type, as well as being equal to each other, for the test to fail, else it succeeds.

returns = 1 upon success or 0 upon failure. Success means that the sequences are unequal or, if the optional parameter is specified, that the sequences are not of the optional VMD type; otherwise 0 is returned if the sequences are equal.

The macro is implemented as the complement of BOOST_VMD_EQUAL, so that whenever BOOST_VMD_EQUAL would return 1 the macro returns 0 and whenever BOOST_VMD_EQUAL would return 0 the macro would return 1.

Determines if a sequence is a VMD seq.

The macro checks that the sequence is a VMD seq. A VMD seq, which may be a Boost PP seq or emptiness, is a superset of a Boost PP seq. It returns 1 if it is a VMD seq, else if returns 0.

sequence = a possible Boost PP seq

returns = 1 if it a VMD seq, else returns 0.

pops an element from the end of a seq.

seq = seq to pop an element from.

If the seq is an empty seq the result is undefined. If the seq is a single element the result is an empty seq. Otherwise the result is a seq after removing the last element.

pops an element from the end of a tuple.

tuple = tuple to pop an element from.

If the tuple is an empty tuple the result is undefined. If the tuple is a single element the result is an empty tuple. Otherwise the result is a tuple after removing the last element.

pops an element from the end of a tuple. It reenters BOOST_PP_REPEAT with maximum efficiency.

z = the next available BOOST_PP_REPEAT dimension. tuple = tuple to pop an element from.

If the tuple is an empty tuple the result is undefined. If the tuple is a single element the result is an empty tuple. Otherwise the result is a tuple after removing the last element.

pops an element from the front of a seq.

seq = seq to pop an element from.

If the seq is an empty seq the result is undefined. If the seq is a single element the result is an empty seq. Otherwise the result is a seq after removing the first element.

pops an element from the front of a tuple.

tuple = tuple to pop an element from.

If the tuple is an empty tuple the result is undefined. If the tuple is a single element the result is an empty tuple. Otherwise the result is a tuple after removing the first element.

pops an element from the front of a tuple. It reenters BOOST_PP_REPEAT with maximum efficiency.

z = the next available BOOST_PP_REPEAT dimension. tuple = tuple to pop an element from.

If the tuple is an empty tuple the result is undefined. If the tuple is a single element the result is an empty tuple. Otherwise the result is a tuple after removing the first element.

appends an element to the end of a seq.

seq = seq to to append an element to. elem = element to append.

If the seq is an empty seq the result is a seq with the single element. Otherwise the result is a seq after adding the element to the end.

appends an element to the end of a tuple.

tuple = tuple to to append an element to. elem = element to append.

If the tuple is an empty tuple the result is a tuple with the single element. Otherwise the result is a tuple after adding the element to the end.

inserts an element at the beginning of a seq.

seq = seq to insert an element at. elem = element to insert.

If the seq is an empty seq the result is a seq with the single element. Otherwise the result is a seq after inserting the element at the beginning.

inserts an element at the beginning of a tuple.

tuple = tuple to insert an element at. elem = element to insert.

If the tuple is an empty tuple the result is a tuple with the single element. Otherwise the result is a tuple after inserting the element at the beginning.

removes an element from a seq.

seq = seq from which an element is to be removed. index = The zero-based position in seq of the element to be removed.

If index is greater or equal to the seq size the result is undefined. If the seq is a single element and the index is 0 the result is an empty seq. Otherwise the result is a seq after removing the index element.

removes an element from a tuple.

tuple = tuple from which an element is to be removed. index = The zero-based position in tuple of the element to be removed.

If index is greater or equal to the tuple size the result is undefined. If the tuple is a single element and the index is 0 the result is an empty tuple. Otherwise the result is a tuple after removing the index element.

removes an element from a tuple. It reenters BOOST_PP_WHILE with maximum efficiency.

d = The next available BOOST_PP_WHILE iteration. tuple = tuple from which an element is to be removed. index = The zero-based position in tuple of the element to be removed.

If index is greater or equal to the tuple size the result is undefined. If the tuple is a single element and the index is 0 the result is an empty tuple. Otherwise the result is a tuple after removing the index element.

expands to the size of the seq passed to it.

seq = seq whose size is to be extracted.

If the seq is an empty seq its size is 0. Otherwise the result is the number of elements in the seq.

Returns the size of a sequence.

sequence = A sequence to test.

returns = If the sequence is empty returns 0, else returns the number of elements in the sequence.

Returns the size of a sequence. Re-entrant version.

d = The next available BOOST_PP_WHILE iteration. sequence = A sequence to test.

returns = If the sequence is empty returns 0, else returns the number of elements in the sequence.

expands to the size of the tuple passed to it.

tuple = tuple whose size is to be extracted.

If the tuple is an empty tuple its size is 0. Otherwise the result is the number of elements in the tuple.

converts a seq to an array.

seq = seq to be converted.

If the seq is an empty seq it is converted to an array with 0 elements. Otherwise the seq is converted to an array with the same number of elements as the seq.

Converts a sequence to a Boost PP array whose elements are the elements of the sequence.

... = Variadic parameters.

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP array. The sequence is empty the Boost PP array is an empty array. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the array element. Otherwise just the data is returned as the array element, which is the default.

Converts a sequence to a Boost PP array whose elements are the elements of the sequence. Re-entrant version.

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

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP array. The sequence is empty the Boost PP array is empty. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the array element. Otherwise just the data is returned as the array element, which is the default.

converts a tuple to an array.

tuple = tuple to be converted.

If the tuple is an empty tuple it is converted to an array with 0 elements. Otherwise the tuple is converted to an array with the same number of elements as the tuple.

converts a seq to a list.

seq = seq to be converted.

If the seq is an empty seq it is converted to an empty list (BOOST_PP_NIL). Otherwise the seq is converted to a list with the same number of elements as the seq.

Converts a sequence to a Boost PP list whose elements are the elements of the sequence.

... = Variadic parameters.

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP list. The sequence is empty the Boost PP list is an empty list. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the list element. Otherwise just the data is returned as the list element, which is the default.

Converts a sequence to a Boost PP list whose elements are the elements of the sequence. Re-entrant version.

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

The first variadic parameter is required and is the sequence to convert.

Further optional variadic parameters can be return type parameters. Return type parameters allow each element in the sequence to be converted to a two-element tuple where the first tuple element is the type and the second tuple element is the element data.

The BOOST_VMD_RETURN_NO_TYPE, the default, does not return the type as part of each converted element but just the data. All of the rest return the type and data as the two-element tuple. If BOOST_VMD_RETURN_TYPE is specified the specific type of the element is returned in the tuple. 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 more than one return type optional parameter is specified the last one specified determines the return type.

returns = A Boost PP list. The sequence is empty the Boost PP list is an empty list. If an optional return type other than BOOST_VMD_RETURN_NO_TYPE is specified the type and the data of each element is returned as the list element. Otherwise just the data is returned as the list element, which is the default.

converts a tuple to a list.

tuple = tuple to be converted.

If the tuple is an empty tuple it is converted to an empty list (BOOST_PP_NIL). Otherwise the tuple is converted to a list with the same number of elements as the tuple.

Determines if a sequence is a VMD tuple.

The macro checks that the sequence is a VMD tuple. A VMD tuple, which may be a Boost PP tuple or emptiness, is a superset of a Boost PP tuple. It returns 1 if it is a VMD tuple, else if returns 0.

sequence = a possible Boost PP tuple

returns = 1 if it a VMD tuple, else returns 0.