#define and commas

From: Bolin (gao_bolin_at_voila.fr)
Date: 10/29/04


Date: 29 Oct 2004 13:49:24 -0700

I am using a macro to define template functions that look the same
except for a type. However when the return type it a template class
with several template arguments (say, A<T1, T2>) then the macro does
not work because of the comma -- the macro thinks there are more
arguments provided since the comma separates arguments. To avoid the
comma being taken into account the usual way is to put parenthesis,
but here it would not work because the argument is a return type, and
I cannot declare a function like

(A<T1, T2>) foo();

Is there a way to get around this problem?

Thanks

B.



Relevant Pages

  • Re: Understanding Macros
    ... I have the newly created macro toolbar on the template. ... There is no panel on the left of the screen that opens that looks like ...
    (microsoft.public.word.docmanagement)
  • RE: word error
    ... your Normal.dot template may be infected with a macro virus. ... How to remove WLL add-ins and templates in the Word and Office Startup ... Startup folder is causing the problem, ...
    (microsoft.public.office.misc)
  • Re: How do I set up automatically suceeding numbers in Word?
    ... So I'll suggest that for each one you take the name of the template ... then the corresponding names inside the macro could be "Contract A ... "Jay Freedman" wrote: ... digits to display -- and not the number itself. ...
    (microsoft.public.word.docmanagement)
  • Re: How to control macros
    ... values for initalising a UserForm using document variables I'd be willing to ... When I initially create a document from a template, I set a flag to indicate ... As for a "global macro template", I don't have one - at least not for the ...
    (microsoft.public.word.vba.general)
  • Re: Changing default window properties
    ... What do YOU mean by "Global Template"? ... more than one macro of the same ... not willing to mess up my AutoOpen/New macros by testing this. ...
    (microsoft.public.mac.office.word)