|
Boost : |
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2006-05-11 20:47:57
Felipe Magno de Almeida wrote:
> > I guess that would imply to modify the preprocessor's
> internal state,
> > i.e. causing it to look as if the condition that was actually false
> > had been true. Everything else would potentially lead to
> inconsistent
> > or undefined behavior.
>
> I think I could keep the last context and define/undefine
> whatever is needed to make the evaluation true. Then
> preprocess the two contexts.
> Shouldnt that do it?
We had a similar discussion already. This involves some kind of
re-evaluation of some of the input sequence after changing the internal
state of the preprocessor. Wave currently does not support this.
Wouldn't this involve making copies of the internal state essentially after
every token (or at least before every pp operation), just to ensure it can
be restarted at arbitrary points?
I'm sure its impossible to make sure not to run into inconsistencies when
trying to implement such a scheme (even putting aside the possible
performance implications of making state copies).
Regards Hartmut
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk