Boost logo

Boost Users :

Subject: Re: [Boost-users] [proto] const-ness of references
From: Manjunath Kudlur (keveman_at_[hidden])
Date: 2010-03-10 14:39:57


> Yes, that's one of the purposes of Proto domains. I was making an important
> point that you may have missed. This is how things are intended to work:
>
> 1) All proto expressions have an associated domain. If you haven't specified
> one, it is proto::default_domain.
>
> 2) All proto domains have an associated generator that, given an expression
> in the default domain, puts it in the specified domain by adding a
> domain-specific wrapper. (This is where domain-specific properties and
> behaviors go.)
>
> 3) An expression can only be in one domain (in the current implementation).
> A domain can have only one generator. There may be many domain-specific
> wrappers in each domain, each that presents a different interface. The
> generator's job is to add the right wrapper to a given expression. Most of
> the time, there is only one wrapper but that need not be the case.
>
> 4) All operations on proto expressions produce new expressions in the same
> domain as its constituents.
>
> When I said that your generator was unusual, it was because it doesn't
> follow (2) above ... the expression emitted by your generator is sometimes
> in the program_domain, and sometimes in the default domain.

Thanks for the detailed explanation. Things are much clear now.

Manjunath


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