| Home | Libraries | People | FAQ | More

## Macro BOOST_VMD_IS_UNARY_D

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

## Synopsis

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

    BOOST_VMD_IS_UNARY_D(d, sequence)

## Description

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.