|
Boost Users : |
Subject: Re: [Boost-users] Defining Statements with Proto
From: Joel.Falcou_at_[hidden]
Date: 2010-01-07 03:31:11
> Is there any advantage to doing:
>
> // An if_ "operator"
> template<typename Expr>
> typename boost::proto::result_of::make_expr<
> boost::proto::tag::function,
> Domain,
> keyword::if_,
> Expr>::type
> if_(Expr const &expr)
> {
> return boost::proto::make_expr<boost::proto::tag::function,
> Domain>(
> keyword::if_(),
> expr);
> }
>
> over:
>
> typedef Wrapper<boost::proto::terminal<keyword::if_>::type>
> IfTerminal;
>
> // An if_ "operator."
> namespace {
> const IfTerminal if_ = {{}};
> }
>
> and letting proto take care of creating the function expression?
> Perhaps the former has one or two less template instantiations
> but the latter is certainly easier to maintain
I can't find lu right now but i made an extensive test for this and the
function form id more scalable in terme of compile time and exe size
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net