Boost logo

Boost Users :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2007-06-06 19:18:05


 
Ludovic Aubert wrote:

> I have written a sample program which uses boost wave and I
> am trying to run it on its own source code. The environnement
> (especially the stl) is Microsoft Visual C++ 2005.
> Since typically an include file like "vector" will be
> preprocessed many times (once for every compilation unit), I
> am saving all the preprocessed tokens in a map<string,
> map<tuple<int,int>,string> > token, so that
> token[path][make_tuple(line,col)] = value.
> Then for each path I am using a forward iterator to spit out
> all the values into a buffer.
>
> The major trouble I have is with the macros
> #define STD_BEGIN namespace std {
> #define STD_END }
> defined in the file "yvals.h"
> Somehow, STD_BEGIN and STD_END are replaced by blanks and I
> get "namespace std{}" at the end of the files instead. Looks
> like the line and col for these items are wrong ...

The problem is, that all tokens always carry the positional information of
the place of their initial occurrence, i.e. tokens from a replacement text
of a macro carry the position where they have been defined, and not where
they have been inserted in the output.

> I would like to know if someone has already successfully
> preprocessed the stl delivered with Visual C++ 2005.

Sure, this should work. Try to preprocess these headers with the wave driver
applet (boost/tools/wave).

Regards Hartmut


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net