Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/spirit/home/phoenix/statement/sequence.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DEPENDENCIES/generic/include/boost/spirit/home/phoenix/statement/sequence.hpp Tue Aug 05 11:11:38 2014 +0100 @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef PHOENIX_STATEMENT_SEQUENCE_HPP +#define PHOENIX_STATEMENT_SEQUENCE_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +namespace boost { namespace phoenix +{ + struct sequence_eval + { + template <typename Env, typename A0, typename A1> + struct result + { + typedef void type; + }; + + template <typename RT, typename Env, typename A0, typename A1> + static void + eval(Env const& env, A0& a0, A1& a1) + { + a0.eval(env); + a1.eval(env); + } + }; + + namespace detail + { + template <typename BaseT0, typename BaseT1> + struct comma_result + { + typedef actor< + typename as_composite< + sequence_eval + , actor<BaseT0> + , actor<BaseT1> + >::type + > type; + }; + } + + template <typename BaseT0, typename BaseT1> + inline typename detail::comma_result<BaseT0, BaseT1>::type + operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1) + { + return compose<sequence_eval>(a0, a1); + } +}} + +#endif