Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:45:13

0001 /*==============================================================================
0002     Copyright (c) 2005-2008 Hartmut Kaiser
0003     Copyright (c) 2005-2010 Joel de Guzman
0004     Copyright (c) 2010 Thomas Heller
0005 
0006     Distributed under the Boost Software License, Version 1.0. (See accompanying
0007     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 ==============================================================================*/
0009 #ifndef BOOST_PHOENIX_FUSION_AT_HPP
0010 #define BOOST_PHOENIX_FUSION_AT_HPP
0011 
0012 #include <boost/phoenix/core/limits.hpp>
0013 #include <boost/fusion/sequence/intrinsic/at_c.hpp>
0014 #include <boost/phoenix/core/expression.hpp>
0015 #include <boost/phoenix/core/meta_grammar.hpp>
0016 #include <boost/type_traits/remove_reference.hpp>
0017     
0018 BOOST_PHOENIX_DEFINE_EXPRESSION(
0019     (boost)(phoenix)(at_c)
0020   , (proto::terminal<proto::_>)
0021     (meta_grammar)
0022 )
0023 
0024 namespace boost { namespace phoenix
0025 {
0026     template <typename Dummy>
0027     struct default_actions::when<rule::at_c, Dummy>
0028         : proto::call<
0029             proto::functional::at(
0030                 evaluator(proto::_child_c<1>)
0031               , proto::_value(proto::_child_c<0>)
0032             )
0033         >
0034     {};
0035 
0036     template <int N, typename Tuple>
0037     inline
0038     typename expression::at_c<mpl::int_<N>, Tuple>::type const
0039     at_c(Tuple const& tuple)
0040     {
0041         return
0042             expression::
0043                 at_c<mpl::int_<N>, Tuple>::
0044                     make(mpl::int_<N>(), tuple);
0045     }
0046 }}
0047 
0048 #endif