Boost logo

Boost :

From: Goran Mitrovic (gmit_at_[hidden])
Date: 2004-08-30 05:53:20


> participates in the expression needs to be registered. Every type/template
> is assigned a unique integer identifier. A type is encoded by a single
> integer (its identifier). A template is encoded by its identifier plus
> recursively encoding its parameters.

How did you made templates been recursively encoded? Is the recursion
(theoretically) infinite?

> Barring this, there is an internal ineficiency in my algorithm, and I
> already explained it in one of my previous post. The problem is I am always
> passing a pre-defined number of integers, namely BOOST_MPL_LIMIT_VECTOR_SIZE
> of them, even if the type is simple enough to be encoded just with a couple
> of integers.
> The reason of this is that the real size of the vector becomes known at
> compile time. To be able to operate this compile-time constant, I need to
> pass it to a template meta-function. But it's impossible to also pass the

Would it be possible to use different structure instead of vector? Some kind of
compile-time btree structure might be a smaller stress for a compiler if that
would be suitable for your algorithm.

> > the implementation
> > is too messy
> Would you mind to elaborarate on this please -- I find this statement quite
> offensive.
> More importantly, I just find it not true.

The code that uses boost preprocessor library (mine is included) is messy by
default. :) You shouldn't and please don't be offended since I haven't meant it
like that! Your typeof, except for speed, works extraordinary well! I'm talking
about the appearance of the code - I might be a weak in the terms of generic
programming, but, it's practically impossible to find out how your method works
just looking at the code! :(


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk