predefined_macros.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Predefined Macros</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <link href="theme/style.css" rel="stylesheet" type="text/css">
  7. </head>
  8. <body>
  9. <table width="100%" border="0" cellspacing="2" background="theme/bkd2.gif">
  10. <tr>
  11. <td width="21"> <h1></h1></td>
  12. <td width="885"> <font face="Verdana, Arial, Helvetica, sans-serif"><b><font size="6">Predefined
  13. Macros </font></b></font></td>
  14. <td width="96"><a href="http://www.boost.org"><img src="theme/wave.gif" width="93" height="68" align="right" border="0"></a></td>
  15. </tr>
  16. </table>
  17. <br>
  18. <table border="0">
  19. <tr>
  20. <td width="10"></td>
  21. <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
  22. <td width="30"><a href="class_reference_inptpolcy.html"><img src="theme/l_arr.gif" width="20" height="19" border="0"></a></td>
  23. <td width="30"><a href="macro_expansion_process.html"><img src="theme/r_arr.gif" border="0"></a></td>
  24. </tr>
  25. </table>
  26. <p dir="ltr">The following table lists the macros, which are predefined by the
  27. <tt>Wave</tt> library. Some of these (all except the <code class="keyword">__LINE__</code>,
  28. <code class="keyword">__FILE__</code>, <code class="keyword">__BASE_FILE__</code>, <code class="keyword">__DATE__</code>,
  29. <code class="keyword">__TIME__</code>, <code class="keyword">__STDC__, __INCLUDE_LEVEL__</code>
  30. and <code class="keyword">__cplusplus</code> macros) may be undefined from the command line of the driver executable
  31. (<a href="wave_driver.html">see</a> the -U option) or through the function <a href="class_reference_context.html#remove_macro_definition">remove_macro_definition()</a>.</p>
  32. <table width="90%" border="0" align="center">
  33. <tr>
  34. <td colspan="3" class="table_title"><b>Summary of predefined macros</b></td>
  35. </tr>
  36. <tr class="table_title">
  37. <td width="28%"><b>Name</b></td>
  38. <td width="62%"><p><code><font face="Verdana, Arial, Helvetica, sans-serif">Value</font></code></p></td>
  39. <td width="10%">Undefinable</td>
  40. </tr>
  41. <tr>
  42. <td width="28%" class="table_cells"><code>__STDC__</code></td>
  43. <td width="62%" class="table_cells"><p> 1 (a decimal constant)</p></td>
  44. <td width="10%" class="table_cells"><p>yes</p></td>
  45. </tr>
  46. <tr>
  47. <td width="28%" class="table_cells"><code>__cplusplus</code></td>
  48. <td width="62%" class="table_cells"> <p>199711L (a decimal constant), this
  49. is defined in C++ mode only (C99 mode is off)<br>
  50. In the C++0x mode this decimal constant is guaranteed to be larger than
  51. 199711L (the concrete value is to be defined by the C++ committee).</p></td>
  52. <td width="10%" class="table_cells"><p>no</p></td>
  53. </tr>
  54. <tr>
  55. <td class="table_cells"><code>__LINE__</code></td>
  56. <td class="table_cells"><p>The line number of the current source line (a decimal
  57. constant)</p></td>
  58. <td class="table_cells"><p>no</p></td>
  59. </tr>
  60. <tr>
  61. <td class="table_cells"><code>__FILE__</code></td>
  62. <td class="table_cells"><p>The presumed name of the source file (a character string literal)</p></td>
  63. <td class="table_cells"><p>no</p></td>
  64. </tr>
  65. <tr>
  66. <td class="table_cells"><code>__BASE_FILE__</code></td>
  67. <td class="table_cells"><p> This macro expands to the name of the main input file (a character string literal). This is the source file that was specified during construction of the <a href="class_reference_context.html"><tt>wave::context</tt></a> template.</p></td>
  68. <td class="table_cells"><p>no</p></td>
  69. </tr>
  70. <tr>
  71. <td class="table_cells"><code>__DATE__</code></td>
  72. <td class="table_cells"><p>The date of translation of the source file (a character
  73. string literal of the form<br>
  74. &quot;Mmm dd yyyy&quot;, where the names of the months are the same as
  75. those generated by the asctime function, and the first character of dd
  76. is a space character if the value is less than 10). </p></td>
  77. <td class="table_cells"><p>no</p></td>
  78. </tr>
  79. <tr>
  80. <td class="table_cells"><code>__TIME__</code></td>
  81. <td class="table_cells"><p>The time of translation of the source file (a character
  82. string literal of the form &quot;hh:mm:ss&quot;<br>
  83. as in the time generated by the asctime function).</p></td>
  84. <td class="table_cells"><p>no</p></td>
  85. </tr>
  86. <tr>
  87. <td class="table_cells"><code>__INCLUDE_LEVEL__</code></td>
  88. <td class="table_cells"><p>A decimal integer constant that represents the
  89. depth of nesting in include <br>
  90. files. The value of this macro is incremented on every <tt>#include</tt>
  91. directive <br>
  92. and decremented at every end of file. </p></td>
  93. <td class="table_cells"><p>no</p></td>
  94. </tr>
  95. <tr>
  96. <td class="table_cells"><code>__WAVE__</code><br> <code>__SPIRIT_PP__</code></td>
  97. <td class="table_cells"><p>The version of the driver program (a hexadecinal
  98. constant of the form 0xMmrr, where <span class="literal">'M'</span> is
  99. the major version number, <span class="literal">'m'</span> the minor version
  100. number and <span class="literal">'rr'</span> the release number).</p></td>
  101. <td class="table_cells"><p>yes</p></td>
  102. </tr>
  103. <tr>
  104. <td class="table_cells"><code>__WAVE_VERSION__</code><br> <code>__SPIRIT_PP_VERSION__</code></td>
  105. <td class="table_cells"><p>The full version number of the driver program (a
  106. hexadecimal constant of the form 0xMmrrbbbb, where <span class="literal">'M'</span>
  107. is the major version number, <span class="literal">'m'</span> the minor
  108. version number, <span class="literal">'rr'</span> the release number and
  109. <span class="literal">'bbbb'</span> the build number).</p></td>
  110. <td class="table_cells"><p>yes</p></td>
  111. </tr>
  112. <tr>
  113. <td class="table_cells"><code>__WAVE_VERSION_STR__</code><br> <code>__SPIRIT_PP_VERSION_STR__</code></td>
  114. <td class="table_cells"><p>The full version number of the driver program (a
  115. character string literal of the form <span class="string">&quot;M.m.rr.bbbb&quot;</span>,
  116. where <span class="literal">'M'</span> is the major version number, <span class="literal">'m'</span>
  117. the minor version number, <span class="literal">'rr'</span> the release
  118. number and <span class="literal">'bbbb'</span> the build number).</p></td>
  119. <td class="table_cells"><p>yes</p></td>
  120. </tr>
  121. <tr>
  122. <td class="table_cells"><code>__STDC_VERSION__</code></td>
  123. <td class="table_cells"><p>199901L (a decimal constant), this is defined in C99 and C++0x modes only</p></td>
  124. <td class="table_cells"><p>yes</p></td>
  125. </tr>
  126. <tr>
  127. <td class="table_cells"><code>__STDC_HOSTED__</code></td>
  128. <td class="table_cells"><p>0L (a decimal constant), this is defined in C99 and C++0x modes only</p></td>
  129. <td class="table_cells"><p>yes</p></td>
  130. </tr>
  131. <tr>
  132. <td class="table_cells"><code>__WAVE_HAS_VARIADICS__</code></td>
  133. <td class="table_cells"><p>1 (a decimal constant), this is defined in C++
  134. mode only if variadics and placemarkers are enabled, and it is defined
  135. in the C99 and C++0x modes</p></td>
  136. <td class="table_cells"><p>no</p></td>
  137. </tr>
  138. <tr>
  139. <td class="table_cells"><code>__WAVE_CONFIG__</code></td>
  140. <td class="table_cells"><p>The configuration information used during the compilation of the Wave library. This is a hexadecimal constant, where each of the bits represents a certain configuration option enabled/disabled during the compilation. You can query this contant using the following macro constants available in the <tt>wave_config_constant.hpp</tt> file:</p>
  141. <blockquote>
  142. <p> <tt>BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS_CONFIG</tt> (value: <span class="literal">0x1</span>) <br>
  143. Variadics and placemarkers are supported</p>
  144. <p><tt>BOOST_WAVE_SUPPORT_PRAGMA_ONCE_CONFIG</tt> (value: <span class="literal">0x02</span>)<br>
  145. <span class="preprocessor">#pragma once</span> (<span class="keyword">_Pragma(once))</span> is supported </p>
  146. <p><tt>BOOST_WAVE_SUPPORT_MS_EXTENSIONS_CONFIG</tt> (value: <span class="literal">0x04</span>)<br>MS Extensions are supported </p>
  147. <p><tt>BOOST_WAVE_PREPROCESS_PRAGMA_BODY_CONFIG</tt> (value: <span class="literal">0x08</span>)<br>
  148. The bodies of <span class="preprocessor">#pragma</span> statements (operator <span class="keyword">_Pragma</span>) will be preprocessed
  149. <p><tt>BOOST_WAVE_USE_STRICT_LEXER_CONFIG</tt> (value: <span class="literal">0x10</span>)<br>
  150. The C/C++ lexers recognize the
  151. strict C99/C++ basic source character set. If it is not defined or defined
  152. to zero, the lexers recognize the <span class="string">'$'</span> character as part of identifiers.</p>
  153. </blockquote>
  154. <p><br>
  155. </p></td>
  156. <td class="table_cells"><p>yes</p></td>
  157. </tr>
  158. </table>
  159. <br>
  160. <table border="0">
  161. <tr>
  162. <td width="10"></td>
  163. <td width="30"><a href="../index.html"><img src="theme/u_arr.gif" border="0"></a></td>
  164. <td width="30"><a href="class_reference_inptpolcy.html"><img src="theme/l_arr.gif" width="20" height="19" border="0"></a></td>
  165. <td width="30"><a href="macro_expansion_process.html"><img src="theme/r_arr.gif" border="0"></a></td>
  166. </tr>
  167. </table>
  168. <hr size="1">
  169. <p class="copyright">Copyright &copy; 2003-2011 Hartmut Kaiser<br>
  170. <br>
  171. <font size="2">Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) </font> </p>
  172. <span class="updated"></span>
  173. <p class="copyright"><span class="updated">Last updated:
  174. <!-- #BeginDate format:fcAm1m -->Sunday, January 9, 2011 16:12<!-- #EndDate -->
  175. </span></p>
  176. </body>
  177. </html>