|
Boost Users : |
Subject: Re: [Boost-users] [Proto] Reducing domain check in operator
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-26 13:23:44
Joel Falcou wrote:
> Eric Niebler a écrit :
>> _1 and _2 are in different domains, but _1(_2) is allowed and is in
>> the domain of _1. That's why the expression "_1(_2) + _1" is
>> permitted, but "_1(_2) + _2" is not.
>>
>> You might have to post your code for us to get to the bottom of this.
> Could it come from the fact exponent is just build using
>
> make_expr<nt2::tag::exponent_, domain_of<T>::type, T const&>
>
> and not proto::operator() ?
Oh, you're using make_expr. If the result of exponent(x) is always in
the domain of simd_domain<uint_t>, then you should use that as the
domain parameter to make_expr instead of domain_of<T>::type.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
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