---------- Forwarded message ----------
From: Joel Falcou <joel.falcou@lri.fr>
To: boost-users@lists.boost.org
Date: Sat, 12 Mar 2011 08:24:53 +0100
Subject: Re: [Boost-users] [proto] Object got sliced when passed by reference
I just compiled your smaple using g++-4.5 and i got:

logical_and(
   logical_or(
       terminal(4baseI2F1E)
     , terminal(4baseI2F2E)
   )
 , terminal(4baseI2F3E)
)
hodqhoqw
0

Why is I think the correct answer. So this is tied to some MSVC specific behavior, i guess mayeb on how the terminal< base<_> const &> is matched.
matching terminal< base<_> > should be enough I think no ? Could you try ?

HTH




Thats what I did at the very beginning but fail. So I moved on to try const& but still fail. Before I started using proto, I hand-craft some overloaded operator to return the expression object too but failed with the same error. This makes me think that it is a compiler bug too.

Should I try something else too?