Boost logo

Boost :

From: Peder Holt (peder.holt_at_[hidden])
Date: 2004-08-20 12:09:45


Hi.

I started working on implementing remove_bounds for the VC 6.5
compiler, and found that the source had all the similarities of
Arkadiys typeof implementation, so I have implemented typeof for
compilers not supporting partial specialization. I took many ideas
from Arkadiys implementation, but I had to rewrite the encoding part
from scratch.

The library (apart from being incomplete with respect to function types etc)
has the following key elements in place:
encoding/decoding of:
-fundamental types
-template types
-modifiers (*&const volatile [])

The library has a few improvements that could perhaps be implemented
in Arkadiys typeof implementation as well:

The max depth of an expression increased
from the mpl limit of 60
to the preprocessor limit of 256

template expressions containing integral values are allowed

The template:
template<typename T,unsigned long V>
struct X {};
can be exposed to typeof in the following way:
BOOST_TYPEOF_DEFINE_TEMPLATE(X,2,(typename,unsigned long))
(VC 7.1 had some problems preprocessing the code needed to make this work.)

The source is available at:
http://groups.yahoo.com/group/boost/files/typeof_vintage.zip

I have compiled the library for VC 6.5 and 7.0.
They both fail when the depth of an expression gets too large, with
the error message:
fatal error C1045: compiler limit : linkage specifications nested too deeply.

--
Peder Holt

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