25 Aug
2009
25 Aug
'09
8:21 p.m.
Maurizio Vitale wrote:
"Eric" == Eric Niebler
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