1 .. Sequences/Intrinsic Metafunctions//order
17 typedef |unspecified| type;
25 Returns a unique unsigned |Integral Constant| associated with the key ``Key`` in
34 #include <boost/mpl/order.hpp>
40 |Tag Dispatched Metafunction|
46 +---------------+---------------------------+-----------------------------------------------+
47 | Parameter | Requirement | Description |
48 +===============+===========================+===============================================+
49 | ``Sequence`` | |Associative Sequence| | A sequence to query. |
50 +---------------+---------------------------+-----------------------------------------------+
51 | ``Key`` | Any type | The queried key. |
52 +---------------+---------------------------+-----------------------------------------------+
58 For any |Associative Sequence| ``s``, and arbitrary type ``key``:
62 typedef order<s,key>::type n;
65 Unsigned |Integral Constant|.
68 If ``has_key<s,key>::value == true``, ``n`` is a unique unsigned
69 |Integral Constant| associated with ``key`` in ``s``; otherwise,
70 ``n`` is identical to ``void_``.
76 Amortized constant time.
84 typedef map< pair<int,unsigned>, pair<char,long> > m;
86 BOOST_MPL_ASSERT_NOT(( is_same< order<m,int>::type, void\_ > ));
87 BOOST_MPL_ASSERT(( is_same< order<m,long>::type,void\_ > ));
94 |Associative Sequence|, |has_key|, |count|, |map|
97 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
98 Distributed under the Boost Software License, Version 1.0. (See accompanying
99 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)