sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: /// \file proto.hpp sl@0: /// The proto expression template compiler and supporting utilities. sl@0: // sl@0: // Copyright 2004 Eric Niebler. Distributed under the Boost sl@0: // Software License, Version 1.0. (See accompanying file sl@0: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: #ifndef BOOST_PROTO_HPP_EAN_04_01_2005 sl@0: #define BOOST_PROTO_HPP_EAN_04_01_2005 sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: namespace boost { namespace proto sl@0: { sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // compile_result sl@0: template sl@0: struct compile_result sl@0: { sl@0: typedef typename as_op::type op_type; sl@0: typedef typename tag_type::type tag_type; sl@0: typedef compiler compiler_type; sl@0: typedef typename compiler_type::BOOST_NESTED_TEMPLATE apply::type type; sl@0: }; sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // compile sl@0: template sl@0: typename compile_result::type const sl@0: compile(Op const &op, State const &state, Visitor &visitor, DomainTag) sl@0: { sl@0: typedef typename as_op::type op_type; sl@0: typedef compiler::type, DomainTag> compiler; sl@0: return compiler::call(as_op::make(op), state, visitor); sl@0: } sl@0: sl@0: }} // namespace boost::proto sl@0: sl@0: #endif