christophe henry wrote:
Thanks Eric for your fast answer! Unfortunately, this doesn't solve my problem. To make a very very long discussion long, here a small example showing the problem from another side: I have an expression wrapper called mp_terminal and I define terminals, but not in the documented way (which I suspect is the problem)
Indeed.
but instead deriving from them (for convenience purposes), for example: struct True : mp_terminal
::type> {...}
<snip>
Then, why do most use cases work like a charm? Only unary operators seem to fail.
It's because (a) True is a Proto type, but hasn't been made so by
directly using proto::extends, and (b) Proto's unary operators are being
a little too nit-picky about (a).
I have fixed (b) on trunk (changelist 54610). In the mean time, you can
change your definition of True and False to use this formulation:
struct True
: proto::extends<
mp_terminal