2 #ifndef BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
\r
3 #define BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2003-2004
\r
6 // Copyright David Abrahams 2003-2004
\r
8 // Distributed under the Boost Software License, Version 1.0.
\r
9 // (See accompanying file LICENSE_1_0.txt or copy at
\r
10 // http://www.boost.org/LICENSE_1_0.txt)
\r
12 // See http://www.boost.org/libs/mpl for documentation.
\r
14 // $Id: order_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
16 // $Revision: 49267 $
\r
18 #include <boost/mpl/order_fwd.hpp>
\r
19 #include <boost/mpl/if.hpp>
\r
20 #include <boost/mpl/long.hpp>
\r
21 #include <boost/mpl/has_key.hpp>
\r
22 #include <boost/mpl/aux_/overload_names.hpp>
\r
23 #include <boost/mpl/aux_/static_cast.hpp>
\r
24 #include <boost/mpl/aux_/type_wrapper.hpp>
\r
25 #include <boost/mpl/aux_/traits_lambda_spec.hpp>
\r
26 #include <boost/mpl/aux_/config/msvc.hpp>
\r
27 #include <boost/mpl/aux_/config/static_constant.hpp>
\r
28 #include <boost/mpl/aux_/config/workaround.hpp>
\r
30 namespace boost { namespace mpl {
\r
32 // default implementation; requires 'Seq' to provide corresponding overloads
\r
33 // of BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY
\r
35 template< typename Seq, typename Key > struct x_order_impl
\r
36 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
\r
37 || BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
\r
39 BOOST_STATIC_CONSTANT(long, value =
\r
40 sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(
\r
42 , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0)
\r
46 typedef long_<value> type;
\r
50 sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(
\r
52 , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0)
\r
59 template< typename Tag >
\r
62 template< typename Seq, typename Key > struct apply
\r
64 typename has_key_impl<Tag>::template apply<Seq,Key>
\r
65 , x_order_impl<Seq,Key>
\r
72 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,order_impl)
\r
76 #endif // BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
\r