Eric Niebler wrote:
Seems like a bug in Proto. Can you file a bug and attach a complete, compilable example that demonstrates the problem?
OK, will do on Monday.
Well, using proto::extends is the way to go. I can help you do that, once I figure out what you're really mean by:
class smartint : public simd_expr<proto::terminal<smartint>::type>
Usually, you can handle this sort of thing by making a separate smartint_impl class that has the data, and defining smartint as:
class smartint : public simd_expr<proto::terminal<smartint_impl>::type>
Does that help?
That seems to be what I want to do. My goal is to have a Blitz++-style type, i.e. every expression written on a single line is first captured as an expression template, optimized by metafunctions, and evaluated as a whole. smartint is the basic arithmetic type in this scheme, so I want every expression involving a smartint to be a Proto expression (simd_expr). simd_expr then has an implicit conversion back to smartint that evaluates the expression. Sebastian