Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #15077
| From | thomas <freshthomas@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: macro definition for different compile configurations |
| Date | 2012-03-27 07:05 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <29708976.1032.1332857135546.JavaMail.geo-discussion-forums@ynim7> (permalink) |
| References | <26170974.62.1332833351847.JavaMail.geo-discussion-forums@ynel5> |
On Tuesday, March 27, 2012 3:29:11 PM UTC+8, thomas wrote:
> Hi,
> I'm stucked by something appears really simple at first sight.
>
> I have a function definition with different parameter list in different compile configurations. for example.
>
> --------------------------
> CONF1:
> int f(int x, int y){}
> int g(int x){}
>
> CONF2:
> int f(int y){}
> int g(){}
> ----------------------------
> I'm trying to define some marco like
>
> #if CONF1
> #define PARAM(list) int x, list
> #elseif CONF2
> #define PARAM(list) list
> #endif
>
> But it cannot work for func g() definition in CONF1 since a "," is appended unexpectedly.
>
> It seems to be really simple, but I am now a little dumb how to define one and solve it elegantly.
>
> thanks.
>
> tom
Seems that you don't understand what I am talking about, just judging by some keyword mentioned.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
macro definition for different compile configurations thomas <freshthomas@gmail.com> - 2012-03-27 00:29 -0700
Re: macro definition for different compile configurations Victor Bazarov <v.bazarov@comcast.invalid> - 2012-03-27 07:58 -0400
Re: macro definition for different compile configurations thomas <freshthomas@gmail.com> - 2012-03-27 06:44 -0700
Re: macro definition for different compile configurations Qi <no@no.com> - 2012-03-27 21:53 +0800
Re: macro definition for different compile configurations Juha Nieminen <nospam@thanks.invalid> - 2012-03-27 17:31 +0000
Re: macro definition for different compile configurations thomas <freshthomas@gmail.com> - 2012-03-27 07:05 -0700
Re: macro definition for different compile configurations Geoff <geoff@invalid.invalid> - 2012-03-27 09:49 -0700
Re: macro definition for different compile configurations Stuart Redmann <DerTopper@web.de> - 2012-03-27 11:27 -0700
Re: macro definition for different compile configurations Geoff <geoff@invalid.invalid> - 2012-03-27 11:46 -0700
Re: macro definition for different compile configurations Stuart Redmann <DerTopper@web.de> - 2012-03-27 12:39 -0700
Re: macro definition for different compile configurations Ian Collins <ian-news@hotmail.com> - 2012-03-28 08:49 +1300
Re: macro definition for different compile configurations Stuart Redmann <DerTopper@web.de> - 2012-03-27 12:58 -0700
Re: macro definition for different compile configurations Geoff <geoff@invalid.invalid> - 2012-03-27 15:50 -0700
Re: macro definition for different compile configurations Juha Nieminen <nospam@thanks.invalid> - 2012-03-28 08:14 +0000
Re: macro definition for different compile configurations Stuart Redmann <DerTopper@web.de> - 2012-03-28 07:30 -0700
Re: macro definition for different compile configurations thomas <freshthomas@gmail.com> - 2012-03-27 18:00 -0700
csiph-web