annotate DEPENDENCIES/generic/include/boost/mpl/aux_/order_impl.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1
Chris@16 2 #ifndef BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
Chris@16 3 #define BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED
Chris@16 4
Chris@16 5 // Copyright Aleksey Gurtovoy 2003-2004
Chris@16 6 // Copyright David Abrahams 2003-2004
Chris@16 7 //
Chris@16 8 // Distributed under the Boost Software License, Version 1.0.
Chris@16 9 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 10 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 11 //
Chris@16 12 // See http://www.boost.org/libs/mpl for documentation.
Chris@16 13
Chris@101 14 // $Id$
Chris@101 15 // $Date$
Chris@101 16 // $Revision$
Chris@16 17
Chris@16 18 #include <boost/mpl/order_fwd.hpp>
Chris@16 19 #include <boost/mpl/if.hpp>
Chris@16 20 #include <boost/mpl/long.hpp>
Chris@16 21 #include <boost/mpl/has_key.hpp>
Chris@16 22 #include <boost/mpl/aux_/overload_names.hpp>
Chris@16 23 #include <boost/mpl/aux_/static_cast.hpp>
Chris@16 24 #include <boost/mpl/aux_/type_wrapper.hpp>
Chris@16 25 #include <boost/mpl/aux_/traits_lambda_spec.hpp>
Chris@16 26 #include <boost/mpl/aux_/config/msvc.hpp>
Chris@16 27 #include <boost/mpl/aux_/config/static_constant.hpp>
Chris@16 28 #include <boost/mpl/aux_/config/workaround.hpp>
Chris@16 29
Chris@16 30 namespace boost { namespace mpl {
Chris@16 31
Chris@16 32 // default implementation; requires 'Seq' to provide corresponding overloads
Chris@16 33 // of BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY
Chris@16 34
Chris@16 35 template< typename Seq, typename Key > struct x_order_impl
Chris@16 36 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
Chris@16 37 || BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
Chris@16 38 {
Chris@16 39 BOOST_STATIC_CONSTANT(long, value =
Chris@16 40 sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(
Chris@16 41 Seq
Chris@16 42 , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0)
Chris@16 43 ) )
Chris@16 44 );
Chris@16 45
Chris@16 46 typedef long_<value> type;
Chris@16 47
Chris@16 48 #else // ISO98 C++
Chris@16 49 : long_<
Chris@16 50 sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(
Chris@16 51 Seq
Chris@16 52 , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0)
Chris@16 53 ) )
Chris@16 54 >
Chris@16 55 {
Chris@16 56 #endif
Chris@16 57 };
Chris@16 58
Chris@16 59 template< typename Tag >
Chris@16 60 struct order_impl
Chris@16 61 {
Chris@16 62 template< typename Seq, typename Key > struct apply
Chris@16 63 : if_<
Chris@16 64 typename has_key_impl<Tag>::template apply<Seq,Key>
Chris@16 65 , x_order_impl<Seq,Key>
Chris@16 66 , void_
Chris@16 67 >::type
Chris@16 68 {
Chris@16 69 };
Chris@16 70 };
Chris@16 71
Chris@16 72 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,order_impl)
Chris@16 73
Chris@16 74 }}
Chris@16 75
Chris@16 76 #endif // BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED