Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-10-02 19:01:19


On 9/14/04 4:24 AM, "Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote:

> Joaquín Mª López Muñoz writes:
>> The problem (see for instance http://tinyurl.com/4j87e) seems to be a
>> trivial confusion with the digraph <:
>>
>> I guess all it takes to fix this is to rewrite line 35 in
>> alignment_of_test.cpp
>>
>> #define ALIGNOF(x) align_calc<x>::get()
>>
>> as
>>
>> #define ALIGNOF(x) align_calc< x>::get()
>>
>> (note the extra blank). OK to commit?

I think the other side of "x" needs space protection too, from ":>" and
">>". So the solution could be changed (again) to:

    #define ALIGNOF(x) align_calc< x >::get()

BTW, can parentheses be used around "x" as better protection instead? Or
does that work only for objects?

> Yes, please! (It's a bug in the compiler/preprocessor, of course).

Not necessarily. It depends on where digraph expansion is supposed to occur
relative to macro expansion.

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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