Files
preprocessor/doc/reference/stringize.htm
Vesa Karvonen b9fc39ddd5 New reference
[SVN r12606]
2002-01-31 15:36:01 +00:00

54 lines
1.7 KiB
HTML

<HTML><HEAD><TITLE>Boost PREPROCESSOR library</TITLE><BODY bgcolor="#FFFFFF">
<a href="index.htm"><IMG height=86 alt="c++boost.gif (8819 bytes)" src="../../../../c++boost.gif" width=277 align=center></a>
<hr>
<H1>#include &lt;<a href="../../../../boost/preprocessor/stringize.hpp">boost/preprocessor/stringize.hpp</a>&gt;</H1>
<hr>
<H2><a name="BOOST_PP_STRINGIZE">#define BOOST_PP_STRINGIZE</a>(X)</H2>
<P>Delays the stringization of X.</P>
<P>For example,</P>
<PRE>
#define NOTE(STR)\
message(__FILE__ "(" <a href="stringize.htm#BOOST_PP_STRINGIZE">BOOST_PP_STRINGIZE</a>(__LINE__) ") : " STR)
// ...
#pragma NOTE("TBD!")
</PRE>
<P>expands to:</P>
<PRE>
#pragma message("examples.cpp" "(" "20" ") : " "TBD!")
</PRE>
<P>The use of <a href="stringize.htm#BOOST_PP_STRINGIZE">BOOST_PP_STRINGIZE</a>() above lets the PP expand the __LINE__
before stringizing it. If # would be used directly, the code would
expand to:</P>
<PRE>
#pragma message("examples.cpp" "(" "__LINE__" ") : " "TBD!")
</PRE>
<hr>
<H2><a name="BOOST_PREPROCESSOR_STRINGIZE">#define BOOST_PREPROCESSOR_STRINGIZE</a>(E)</H2>
<P>Obsolete. Use <a href="stringize.htm#BOOST_PP_STRINGIZE">BOOST_PP_STRINGIZE</a>().</P>
<hr>
<p>(C) Copyright Housemarque Oy 2002</p>
<p>Permission to copy, use, modify, sell and distribute this document is granted
provided this copyright notice appears in all copies. This document is provided
"as is" without express or implied warranty, and with no claim as to its suitability
for any purpose.</p>
<p>Generated: <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan --><!--webbot bot="Timestamp" endspan i-checksum="15246" --></p>
</BODY></HTML>