|
Boost : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-09-03 14:25:46
Daniel Frey wrote:
Hartmut Kaiser wrote:
> Hi all,
>
> The current version of the file type_with_alignment.hpp gives spourios
> errors, because some macro expansion code generates '>>' instead of '>
>
>>' (closing template brackets). The corresponding fixing patch is
>
> attached.
>
> Just out of curiousity: Is this a workaround for a compiler bug?
It is.
> I think
> I remember that if generated by the preprocessor, tokens need to be
> glued with ## to form a single new token like >>, otherwise even two
> consecutive >'s will be treated like two tokens. My colleague says I'm
> wrong. Am I? :)
Nope, you are right. Macro replacement happens after tokenization, and at
that stage the only way to produce a new token is to use the ## operator.
Aleksey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk