
Eric Niebler wrote:
Larry Evans wrote:
Although there's unary_expr<Tag,*>, binary_expr<tag,*,*> in traits.hpp there's no nullary_expr<Tag>. I realize this would be a replacement to the current terminal template but with a user specified tag. After all, if a user specified tag for n-ary (where n>0) expressions *is* desirable, why is a user specified tag for 0-ary expressions *not* desirable? <snip>
Mostly because I couldn't think of a use case at the time. There's nothing in Proto's design that would prohibit a 0-ary expression from having a tag type other than tag::terminal, but I bet there are some places in the code that make that assumption. They would all need to be hunted down and fixed. Probably not too hard.
This is now implemented on trunk. -- Eric Niebler BoostPro Computing http://www.boostpro.com