#ifndef SPROUT_BREED_EVAL_HPP #define SPROUT_BREED_EVAL_HPP #include #include #include namespace sprout { namespace breed { namespace result_of { // // eval // template struct eval { public: typedef typename Context::template eval::result_type type; }; } // namespace result_of namespace functional { // // eval // struct eval { public: SPROUT_BREED_CALLABLE(); public: template struct result; template struct result { typedef typename sprout::breed::result_of::eval< typename std::remove_reference::type, typename std::remove_reference::type >::type type; }; template typename sprout::breed::result_of::eval::type operator()(Expr& e, Context& ctx) const { return typename Context::template eval()(e, ctx); } template typename sprout::breed::result_of::eval::type operator()(Expr& e, Context const& ctx) const { return typename Context::template eval()(e, ctx); } template typename sprout::breed::result_of::eval::type operator()(Expr const& e, Context& ctx) const { return typename Context::template eval()(e, ctx); } template SPROUT_CONSTEXPR typename sprout::breed::result_of::eval::type operator()(Expr const& e, Context const& ctx) const { return typename Context::template eval()(e, ctx); } }; } // namespace functional // // eval // template typename sprout::breed::result_of::eval::type eval(Expr& e, Context& ctx) { return typename Context::template eval()(e, ctx); } template typename sprout::breed::result_of::eval::type eval(Expr& e, Context const& ctx) { return typename Context::template eval()(e, ctx); } template typename sprout::breed::result_of::eval::type eval(Expr const& e, Context& ctx) { return typename Context::template eval()(e, ctx); } template SPROUT_CONSTEXPRtypename sprout::breed::result_of::eval::type eval(Expr const& e, Context const& ctx) { return typename Context::template eval()(e, ctx); } } // namespace breed } // namespace sprout #endif // #ifndef SPROUT_BREED_EVAL_HPP