annotate DEPENDENCIES/generic/include/boost/spirit/home/phoenix/fusion/at.hpp @ 94:12a7ba9fa2b4

Remove subrepos that require auth
author Chris Cannam
date Tue, 21 Apr 2015 12:20:00 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 /*=============================================================================
Chris@16 2 Copyright (c) 2005-2008 Hartmut Kaiser
Chris@16 3 Copyright (c) 2005-2007 Joel de Guzman
Chris@16 4
Chris@16 5 Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7 ==============================================================================*/
Chris@16 8 #ifndef PHOENIX_SEQUENCE_AT_HPP
Chris@16 9 #define PHOENIX_SEQUENCE_AT_HPP
Chris@16 10
Chris@16 11 #include <boost/fusion/include/at.hpp>
Chris@16 12 #include <boost/spirit/home/phoenix/core/actor.hpp>
Chris@16 13 #include <boost/spirit/home/phoenix/core/compose.hpp>
Chris@16 14 #include <boost/type_traits/remove_reference.hpp>
Chris@16 15
Chris@16 16 namespace boost { namespace phoenix
Chris@16 17 {
Chris@16 18 template <int N>
Chris@16 19 struct at_eval
Chris@16 20 {
Chris@16 21 template <typename Env, typename Tuple>
Chris@16 22 struct result
Chris@16 23 {
Chris@16 24 typedef typename Tuple::template result<Env>::type tuple;
Chris@16 25 typedef typename
Chris@16 26 fusion::result_of::at_c<
Chris@16 27 typename remove_reference<tuple>::type, N
Chris@16 28 >::type
Chris@16 29 type;
Chris@16 30 };
Chris@16 31
Chris@16 32 template <typename RT, typename Env, typename Tuple>
Chris@16 33 static RT
Chris@16 34 eval(Env const& env, Tuple const& t)
Chris@16 35 {
Chris@16 36 return fusion::at_c<N>(t.eval(env));
Chris@16 37 }
Chris@16 38 };
Chris@16 39
Chris@16 40 template <int N, typename Tuple>
Chris@16 41 inline actor<typename as_composite<at_eval<N>, Tuple>::type>
Chris@16 42 at_c(Tuple const& tup)
Chris@16 43 {
Chris@16 44 return compose<at_eval<N> >(tup);
Chris@16 45 }
Chris@16 46
Chris@16 47 }}
Chris@16 48
Chris@16 49 #endif