Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2008-04-27 07:01:43

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? On case where this would be
useful is for algebraic morphisms where n-ary ops in a
source algebra are mapped to n-ary ops in a target algebra.
This *includes* 0-ary ops. An op would be the equivalent
to proto tags. I think this could be done by another
transform similar to the pass_through transform but
allowing transformation of the tag. Currently
pass_through just uses the source tag in the target
expression. It seems like it should be pretty easy
to allow transformation on the tag also.

Boost list run by bdawes at, gregod at, cpdaniel at, john at