Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2001-11-25 13:35:01


From: "Hamish Mackenzie" <boost_at_[hidden]>
>> As it stands I think the bugfix of adding ::self onto
>> the end has broken this support.
>
> What compiler/bug does this fix?

It's MWCW Pro 7.0.

> Could it be that the compiler is expanding the macros then having
> trouble tokenizing resulting '>' characters?
>
> If so an extra white space might help...

Been there, done that. I tried not only adding a whitespace, but even adding
an empty comment:

#define TYPELIST_2(T1, T2) ::boost::loki::type_list<T1, TYPELIST_1(T2) >
/**/

Nothing worked. MWCW Pro 7.0's preprocessor insisted on sticking the two
trailing ">" together. Oddly, the same preprocessor didn't insist on
sticking together "<:" in a construct such as SomeTemplate<TYPELIST_2(T1,
T2)>. (For those like me who don't know, "<:" is a sequence that you can use
as "{" or "[", I forgot which).

It is pretty annoying that a preprocessor of which first versions harken
back to the late 60's is still buggy. MSVC's is buggy as well, and I recall
vaguely that gcc's has some problems also. I find this one of the so many
mute witnesses of the sorry state of what we call "the software industry".
(That we don't know how to write min and max with reasonable generality and
efficiency, and that we don't know how to fill and copy memory portably and
efficiently, are two other examples.) You have to crawl before you walk
before you run, and we pretend to be running although we're /terrible/ at
crawling.

Nice proposal for a language change, but shouldn't you have included
"typelistext.hpp"?

Andrei


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