boost::mpl::empty

# empty

### Synopsis

    template<
          typename Sequence
        >
    struct empty
    {
        typedef unspecified type;
    };

### Description

Returns an Integral Constant `c` such that `c::value == true` if and only if the sequence is empty.

### Definition

    #include "boost/mpl/empty.hpp"

### Parameters

Parameter | Requirement | Description
--- | --- | ---
`Sequence` | A model of Sequence |

### Expression semantics

Expression | Expression type | Precondition | Semantics | Postcondition
--- | --- | --- | --- | ---
`typedef empty<Sequence>::type c;` | A model of `bool` Integral Constant |  | Equivalent to `typedef is_same< begin<Sequence>::type,end<Sequence>::type >::type c;` |

### Complexity

Amortized constant time.

### Example

    typedef range_c<int,0,0> empty_range;
    typedef list<long,float,double> types;

    BOOST_STATIC_ASSERT(empty<empty_range>::value)
    BOOST_STATIC_ASSERT(!empty<types>::value)

### See also

Sequence, `size`, `begin`, `end`

Table of Contents
Last edited July 17, 2002 3:52 am