
On Wed, 28 Jun 2006 23:38:25 -0400, David Abrahams <dave@boost-consulting.com> wrote:
Gennaro Prota <gennaro_prota@yahoo.com> writes:
Nothing.
Actually I implemented the pp-based solution yesterday. It's nice and absolutely error-proof. But there's a serious drawback. Can you see it off-hand? (I missed it, in advance, or I would have not written it)
I didn't say it is wrong, just that I can't (still) see an
easier template-only approach for the multidimentional case. It would help if you could post your simpler solution.
I never solved that problem... until today. The enclosed works. It could probably be considerably simplified if you untwist the logic a bit. In particular, you could probably find a way to get rid of remove_bounds. The basic idea here is that the only way to force an error in some contexts, with vc6, is at the top level, with eval0<...>::not_array being a nonexistent type.
I'll see what I'll come up with. Thanks for the hints. I like a lot the names, by the way: sizeof dimension<n>(a) is great :) --Gennaro.