Back to Arangodb

equal

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

3.12.9.12.8 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Algorithms / Querying Algorithms / equal |

equal

Synopsis

template<
      typename Seq1
    , typename Seq2
    , typename Pred = is_same<[\_1](./placeholders.html),[\_2](./placeholders.html)>
    >
struct[equal](./equal.html){
    typedef_unspecified_type;
};

Description

Returns a true-valued Integral Constant if the two sequences Seq1 and Seq2 are identical when compared element-by-element.

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

Parameters

ParameterRequirementDescription
Seq1, Seq2Forward SequenceSequences to compare.
PredBinary Lambda ExpressionA comparison criterion.

Expression semantics

For any Forward Sequences s1 and s2 and a binary Lambda Expression pred:

typedef[equal](./equal.html)<s1,s2,pred>::type c;

| Return type: |

Integral Constant

| | Semantics: |

c::value == true is and only if size<s1>::value == size<s2>::value and for every iterator i in [begin<s1>::type, end<s1>::type) deref<i>::type is identical to

[advance](./advance.html)<[begin](./begin.html)<s2>::type,[distance](./distance.html)<[begin](./begin.html)<s1>::type,i >::type >::type

|

Complexity

Linear. At most size<s1>::value comparisons.

Example

typedef[vector](./vector.html)<char,int,unsigned,long,unsigned long> s1;
typedef[list](./list.html)<char,int,unsigned,long,unsigned long> s2;[BOOST\_MPL\_ASSERT](./assert.html)(([equal](./equal.html)<s1,s2> ));

See also

Querying Algorithms, find, find_if

| 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) |