Back to Arangodb

empty

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/empty.html

3.12.9.12.4 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Intrinsic Metafunctions / empty |

empty

Synopsis

template<
      typename Sequence
    >
struct[empty](./empty.html){
    typedef_unspecified_type;
};

Description

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

#include <[boost/mpl/empty.hpp](../../../../boost/mpl/empty.hpp)>

Model of

Tag Dispatched Metafunction

Parameters

ParameterRequirementDescription
SequenceForward SequenceA sequence to test.

Expression semantics

For any Forward Sequence s:

typedef[empty](./empty.html)<s>::type c;

| Return type: | Boolean Integral Constant. | | Semantics: | Equivalent to typedef is_same< begin<s>::type,end<s>::type >::type c;. | | Postcondition: | empty<s>::value == ( size<s>::value == 0 ). |

Complexity

Amortized constant time.

Example

typedef[range\_c](./range-c.html)<int,0,0> empty_range;
typedef[vector](./vector.html)<long,float,double> types;[BOOST\_MPL\_ASSERT](./assert.html)([empty](./empty.html)<empty_range> );[BOOST\_MPL\_ASSERT\_NOT](./assert-not.html)([empty](./empty.html)<types> );

See also

Forward Sequence, Integral Constant, size, begin / end

| Prev Next | Back Along | Up Home | Full TOC |

Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |