Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*=============================================================================
0002     Copyright (c) 2005-2010 Joel de Guzman
0003     Copyright (c) 2010 Eric Niebler
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #ifndef BOOST_PHOENIX_CORE_DOMAIN_HPP
0009 #define BOOST_PHOENIX_CORE_DOMAIN_HPP
0010 
0011 #include <boost/phoenix/core/limits.hpp>
0012 #include <boost/proto/matches.hpp>
0013 #include <boost/proto/transform/call.hpp>
0014 #include <boost/proto/transform/when.hpp>
0015 #include <boost/proto/domain.hpp>
0016 
0017 namespace boost { namespace phoenix
0018 {
0019     template <typename Expr>
0020     struct actor;
0021     
0022     struct meta_grammar;
0023 
0024     struct phoenix_generator
0025         : proto::switch_<phoenix_generator>
0026     {
0027 
0028         BOOST_PROTO_USE_BASIC_EXPR()
0029 
0030         template<typename Tag>
0031         struct case_
0032             : proto::otherwise<proto::call<proto::pod_generator<actor>(proto::_)> >
0033         {};
0034     };
0035 
0036     // proto's assignment operator takes rhs by reference
0037     template<>
0038     struct phoenix_generator::case_<proto::tag::assign>
0039       : proto::otherwise<proto::call<proto::compose_generators<
0040             proto::by_value_generator
0041           , proto::pod_generator<actor>
0042         >(proto::_)> >
0043     {};
0044 
0045     // proto's subscript operator takes rhs by reference
0046     template<>
0047     struct phoenix_generator::case_<proto::tag::subscript>
0048       : proto::otherwise<proto::call<proto::compose_generators<
0049             proto::by_value_generator
0050           , proto::pod_generator<actor>
0051         >(proto::_)> >
0052     {};
0053 
0054     struct phoenix_default_domain
0055         : proto::domain<
0056            proto::basic_default_generator
0057          , proto::_
0058          , proto::basic_default_domain
0059         >
0060     {
0061         template <typename T>
0062         struct as_child
0063         //: proto_base_domain::as_expr<T> // proto lambda example.
0064           : as_expr<T>
0065         {};
0066     };
0067 
0068     struct phoenix_domain
0069         : proto::domain<
0070             phoenix_generator
0071           , meta_grammar
0072           , proto::basic_default_domain
0073         >
0074     {
0075         template <typename T>
0076         struct as_child
0077         //: proto_base_domain::as_expr<T> // proto lambda example.
0078           : as_expr<T>
0079         {};
0080     };
0081 }}
0082 
0083 #endif