Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-22 14:13:37


Larry Evans wrote:
> To make x2 compile, add an extra {}, IOW
> x2 = { { {1}, {1} } }
> where the extran {} is for expr2::args.
> So, the cost of this extra indirection is
> 1 more curly braces in
> every expr initializer list?

Exactly. If you recall I said that it changes the interface. Not
that it doesn't work. In short, the existence of the "private"
partially specialized version of expr would not entirely be an
implementation detail.

This may also add overhead because of the extra template.
On the other hand, it may compile faster because the operator()
overloads don't need to be duplicated.

Oh. I just realized that this would also force expr::make to change.
expr::make() takes a number of arguments equal to the arity so it
needs to be in the private struct as well. I'm afraid that this would
ripple across the library, and turn out to be a not so minor change, after

In Christ,
Steven Watanabe

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