/////////////////////////////////////////////////////////////////////////////// /// \file eval.hpp /// Contains the eval() expression evaluator. // // Copyright 2007 Eric Niebler. 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 BOOST_PROTO_EVAL_HPP_EAN_03_29_2007 #define BOOST_PROTO_EVAL_HPP_EAN_03_29_2007 #include // must be first include #include #include // must be last include namespace boost { namespace proto { namespace result_of { template struct eval { typedef typename Context::template eval::result_type type; }; } namespace functional { struct eval { template struct result; template struct result : proto::result_of::eval< typename remove_reference::type , typename remove_reference::type > {}; template typename proto::result_of::eval::type operator ()(Expr &expr, Context &context) const { return typename Context::template eval()(expr, context); } template typename proto::result_of::eval::type operator ()(Expr &expr, Context const &context) const { return typename Context::template eval()(expr, context); } }; } functional::eval const eval = {}; }} #endif