[Home]empty

Synopsis

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

Description

シーケンスがemptyの時のみ,c::value == trueになるように, 汎整数定数cを返す.

Definition

#include "boost/mpl/empty.hpp"

Parameters

 Parameter  Requirement  Description  
SequenceSequenceのモデル

Expression semantics

 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef empty<Sequence>::type c;bool Integral Constantのモデル typedef is_same< begin<Sequence>::type,end<Sequence>::type >::type c;と等価

Complexity

償却定数時間

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