|
Boost Users : |
Subject: Re: [Boost-users] [proto] another const issue
From: Eric Niebler (eric_at_[hidden])
Date: 2009-08-25 16:21:31
Maurizio Vitale wrote:
>>>>>> "Eric" == Eric Niebler <eric_at_[hidden]> writes:
>
> Eric> Maurizio Vitale wrote:
>
> Eric> This says, only terminals that are references to ints are
> Eric> allowed. my_int is an int terminal, not an int& terminal,
> Eric> therefore it doesn't match.
>
> Ops. I still have in the back of my mind that everything is by-reference
> in proto, so saying int& was my way to eliminate the const int& case.
>
> Thanks.
Proto will hold things by reference or by value, depending on what you
ask for. You defined the my_int terminal type as:
struct my_int
: my_expr< proto::terminal< int >::type >
That's an int held by value.
-- 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