
26 Feb
2009
26 Feb
'09
10:33 p.m.
Joel Falcou wrote:
Eric Niebler a écrit :
Joel Falcou wrote:
Eric Niebler a écrit :
Cool.
Small variation. If I want the domain of A(B) always be X, I just specify it with make_expr ?
Yes, or else make A a Proto terminal in the X domain.
with :
terminal< A_, X>::type A
or by another mean ??
In the usual way with a Proto extension. E.g., simd_expr<terminal<A_>::type> A = {{}}; where simd_expr<> is an expression extension (i.e., uses proto::extends<> or BOOST_PROTO_EXTENDS()). When you define the extension type, you specify the domain, and any terminals wrapped in that extension wrapper are automatically in that domain. HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com