Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-08-31 12:42:17


"Daniel James" <daniel_at_[hidden]> wrote

> Still, his [Peder's] implementation is fantastic, considering that it runs
on
> Visual C++ 6.

No doubt about this. As you can see, I hadn't even made this to be my goal.
I've spent so much time in the past coping with various ICEs, ISOs, and
ETIs, that I really, really want to avoid dealing with this compiler...

> I wonder if it's worth combinig the two techniques. That is, using
> partial specialisation to encode the type, but storing the value list as
> 'compile-time constants' as in Peder's version. I think it should be
> possible.

At this point I am not even able to understand Peder's implementation, let
alone the ability to combine techniques. It really looks more like a
miracle to me:

#define BOOST_TYPEOF(expr) \
boost::type_of::decode<\
   boost::type_of::value_iterator<\
      sizeof(boost::type_of::encode_start(expr))\
>\

The value_iterator<> has just one integer parameter. How can decode<>
deduce any type from it?!

Regards,
Arkadiy


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