Francois Gouget wrote:
 >

>    Here's the testcase I wrote:
> 
> #define GetObject You cannot use GetObject in this context
> 
> #define ICOM_FN(xfn)    fn ## xfn
> 
> #define DECLARE1(xfn)    void ICOM_FN(xfn) (void);
> #define DECLARE2(xfn)    void ICOM_FN(##xfn) (void);
> 
> 
> ICOM_FN(GetObject)
> DECLARE1(GetObject)
> DECLARE2(GetObject)
> 


How about

#define DECLARE3(xfn,y)  void ICOM_FN(xfn##y) (void);

DECLARE3(GetObject,)


This should avoid the token pasting warning.  However, I'm unsure how 
widely empty macro arguments are supported.  Of course, it also looks 
ugly...


-- 
James Abbatiello


Reply via email to