stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: Stringize macro function?
Date Fri, 18 Apr 2008 20:07:09 GMT
Eric Lemings wrote:
> Woops.  That should be:
>  
> #define FOO(x) BAR(x)
> 

Look at the _RWSTD_STRSTR() macro:
http://fisheye6.cenqua.com/browse/stdcxx/trunk/include/rw/_defs.h?r=trunk#l1160

Martin

> 
> ________________________________
> 
> 	From: Eric Lemings 
> 	Sent: Wednesday, April 16, 2008 3:56 PM
> 	To: Martin Sebor; Travis Vitek
> 	Subject: Stringize macro function?
> 	
> 	
> 	Is there a stringizing macro function that will expand arguments
> in the STDCXX headers somewhere?  Something that does the following:
> 	 
> 	#define BAR(x) #x
> 	#define FOO(x) x
> 	 
> 	#define ONE one
> 	 
> 	const char* s1 = FOO(ONE); // value is "one"
> 	const char* s2 = FOO(two); // value is "two"
> 	 
> 	Thanks.
> 	 
> 


Mime
View raw message