Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] Reducing domain check in operator
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-27 16:15:10


Joel Falcou wrote:
> Dang ... that was it :D Working flawlessly now.

Excellent.

> Back on the initial topic, can't the assertion for discriminating domain
> in operators be added as a domain tempalte parameters usign a lambda ?
> like
>
> struct foo_domain : proto::domain< generator
> , grammar
> , is_same< domain_of<_1>, domain_of<_2> >
> >
>
> And use this lambda in the STATIC_ASSERT ?

That would associate the check with a domain. If there is an expression
involving expressions from N different domains, you have N ways of
checking for compatibility and no way to chose between them.

-- 
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