3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/order.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Intrinsic Metafunctions / order |
template<
typename Sequence
, typename Key
>
struct[order](./order.html){
typedef_unspecified_type;
};
Returns a unique unsigned Integral Constant associated with the key Key in Sequence.
#include <[boost/mpl/order.hpp](../../../../boost/mpl/order.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| Sequence | Associative Sequence | A sequence to query. |
| Key | Any type | The queried key. |
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_. |
Amortized constant time.
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)> ));
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) |