Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-01-11 18:24:53


"Tobias Schwinger" <tschwinger_at_[hidden]> wrote

> There was another typo in preprocess.pl
>
> #include <boost/mpl/vector.hpp>
>
> should be:
>
> #include <boost/typeof/vector.hpp>

Now it's working...

However I ran into a problem that I think needs to be addressed somehow,
namely even if LIMIT_SIZE is set to, say, 60, the vector100.hpp gets
included, and vc71 fails due to max number of template parameters exeeded
(although it can be worked around by defining the preprocessing mode).

It's possible that other compilers might have similar problem.

It should be possible to define a macro (or header) which would create
vector specializations from m to n, and then use this macro to generate
preprocessed files. Then vector.hpp would look something like this:

#if LIMIT_SIZE < 50
REGISTER_VECTOR(0, LIMIT_SIZE)
#elif LIMIT_SIZE < 100
#include <boost/typeof/vector50.hpp>
REGISTER_VECTOR(50, LIMIT_SIZE)
#elif ...

This would become slower for intermediate numbers, since up to 50
specializations might need to be generated on the fly...

Thoughts?

Regards,
Arkadiy


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