Back to Arangodb

order

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

3.12.9.12.6 KB
Original Source

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

order

Synopsis

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

Description

Returns a unique unsigned Integral Constant associated with the key Key in Sequence.

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

Model of

Tag Dispatched Metafunction

Parameters

ParameterRequirementDescription
SequenceAssociative SequenceA sequence to query.
KeyAny typeThe queried key.

Expression semantics

For any Associative Sequence s, and arbitrary type key:

typedef[order](./order.html)<s,key>::type n;

| Return type: | Unsigned Integral Constant. | | Semantics: | If has_key<s,key>::value == true, n is a unique unsigned Integral Constant associated with key in s; otherwise, n is identical to void_. |

Complexity

Amortized constant time.

Example

typedef[map](./map.html)<[pair](./pair.html)<int,unsigned>,[pair](./pair.html)<char,long> > m;[BOOST\_MPL\_ASSERT\_NOT](./assert-not.html)(( is_same<[order](./order.html)<m,int>::type,[void\_](./void.html)> ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[order](./order.html)<m,long>::type,[void\_](./void.html)> ));

See also

Associative Sequence, has_key, count, map

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