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 a snapshot of the develop branch, built from commit dcea408971.
PrevUpHomeNext

Macro BOOST_VMD_IS_UNARY

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

Synopsis

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

BOOST_VMD_IS_UNARY(sequence)

Description

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.


PrevUpHomeNext