Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Wave: a Standard conformant C++ preprocessor library

, 10 Jan 2004
Describes a free and fully Standard conformant C++ preprocessor library
wave_preprocessor_demo.zip
wave.exe
wave_preprocessor_demo1.zip
wave.exe
wave_preprocessor_src.zip
wave
doc
theme
bkd.gif
bkd2.gif
bullet.gif
l_arr.gif
l_arr_disabled.gif
r_arr.gif
r_arr_disabled.gif
uc.gif
u_arr.gif
wave.gif
test
boost-build.jam
cpp_tokens
Jamfile.v2
list_includes
project-root.jam
wave
Jamfile
Jamfile.v2
runtests.sh
test_files
wave
cpplexer
re2clex
cpp.re
test
lextest.in
lextest.output
run_tests.sh
test_lexer.in
test_lexer.output
slex
test
lextest.in
lextest.re2c.output
lextest.slex.output
run_tests.sh
grammars
idllexer
re2clex
idl.re
util
wave_preprocessor_src1.zip
bkd.gif
bkd2.gif
bullet.gif
l_arr.gif
l_arr_disabled.gif
r_arr.gif
r_arr_disabled.gif
u_arr.gif
uc.gif
wave.gif
boost-build.jam
Jamfile.v2
project-root.jam
Jamfile
Jamfile.v2
runtests.sh
cpp.re
lextest.in
lextest.output
run_tests.sh
test_lexer.in
test_lexer.output
lextest.in
lextest.re2c.output
lextest.slex.output
run_tests.sh
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Predefined Macros</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="theme/style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="2" background="theme/bkd2.gif">
  <tr> 
    <td width="21"> <h1></h1></td>
    <td width="885"> <font face="Verdana, Arial, Helvetica, sans-serif"><b><font size="6">Predefined 
      Macros </font></b></font></td>
    <td width="96"><a href="http://spirit.sf.net"><img src="theme/wave.gif" width="93" height="68" align="right" border="0"></a></td>
  </tr>
</table>
<br>
<table border="0">
  <tr> 
    <td width="10"></td>
    <td width="30"><a href="index.html"><img src="theme/u_arr.gif" border="0"></a></td>
    <td width="30"><a href="class_reference_inputpolicy.html"><img src="theme/l_arr.gif" width="20" height="19" border="0"></a></td>
    <td width="30"><a href="supported_pragmas.html"><img src="theme/r_arr.gif" border="0"></a></td>
  </tr>
</table>
<p dir="ltr">The following table lists the macros, which are predefined by the 
  <tt>Wave</tt> library. Some of these (all except the <code class="keyword">__LINE__</code>, 
  <code class="keyword">__FILE__</code>, <code class="keyword">__DATE__</code>, 
  <code class="keyword">__TIME__</code>, <code class="keyword">__STDC__, __INCLUDE_LEVEL__</code> 
  and <code class="keyword">__cplusplus</code> macros, in C++0x mode the <code><tt>__STDC_GLOBAL__</tt></code>, 
  <tt>__STDC_FULL_REGION__</tt> and <tt>__STDC__CURRENT_REGION__</tt> macros are 
  not undefinable too) may be undefined from the command line of the driver executable 
  (<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>
<p dir="ltr">In C++0x mode the predefined macros are available at every macro 
  scope (except <tt>__STDC_GLOBAL__</tt>, which is available at global macro scope 
  only).</p>
<table width="90%" border="0" align="center">
  <tr> 
    <td colspan="3" class="table_title"><b>Summary of predefined macros</b></td>
  </tr>
  <tr class="table_title"> 
    <td width="28%"><b>Name</b></td>
    <td width="62%"><p><code><font face="Verdana, Arial, Helvetica, sans-serif">Value</font></code></p></td>
    <td width="10%">Undefinable</td>
  </tr>
  <tr> 
    <td width="28%" class="table_cells"><code>__STDC__</code></td>
    <td width="62%" class="table_cells"><p> 1 (a decimal constant)</p></td>
    <td width="10%" class="table_cells"><p>yes</p></td>
  </tr>
  <tr> 
    <td width="28%" class="table_cells"><code>__cplusplus</code></td>
    <td width="62%" class="table_cells"> <p>199711L (a decimal constant), this 
        is defined in C++ mode only (C99 mode is off)<br>
        In the C++0x mode this decimal constant is guaranteed to be larger than 
        199711L (the concrete value is to be defined by the C++ committee).</p></td>
    <td width="10%" class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__LINE__</code></td>
    <td class="table_cells"><p>The line number of the current source line (a decimal 
        constant)</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__FILE__</code></td>
    <td class="table_cells"><p>The presumed name of the source file (a character 
        string literal)</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__DATE__</code></td>
    <td class="table_cells"><p>The date of translation of the source file (a character 
        string literal of the form<br>
        &quot;Mmm dd yyyy&quot;, where the names of the months are the same as 
        those generated by the asctime function, and the first character of dd 
        is a space character if the value is less than 10). </p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__TIME__</code></td>
    <td class="table_cells"><p>The time of translation of the source file (a character 
        string literal of the form &quot;hh:mm:ss&quot;<br>
        as in the time generated by the asctime function).</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__INCLUDE_LEVEL__</code></td>
    <td class="table_cells"><p>A decimal integer constant that represents the 
        depth of nesting in include <br>
        files. The value of this macro is incremented on every <tt>#include</tt> 
        directive <br>
        and decremented at every end of file. </p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__WAVE__</code><br> <code>__SPIRIT_PP__</code></td>
    <td class="table_cells"><p>The version of the driver program (a hexadecinal 
        constant of the form 0xMmrr, where <span class="literal">'M'</span> is 
        the major version number, <span class="literal">'m'</span> the minor version 
        number and <span class="literal">'rr'</span> the release number).</p></td>
    <td class="table_cells"><p>yes</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__WAVE_VERSION__</code><br> <code>__SPIRIT_PP_VERSION__</code></td>
    <td class="table_cells"><p>The full version number of the driver program (a 
        hexadecinal constant of the form 0xMmrrbbbb, where <span class="literal">'M'</span> 
        is the major version number, <span class="literal">'m'</span> the minor 
        version number, <span class="literal">'rr'</span> the release number and 
        <span class="literal">'bbbb'</span> the build number).</p></td>
    <td class="table_cells"><p>yes</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__WAVE_VERSION_STR__</code><br> <code>__SPIRIT_PP_VERSION_STR__</code></td>
    <td class="table_cells"><p>The full version number of the driver program (a 
        character string literal of the form <span class="string">&quot;M.m.rr.bbbb&quot;</span>, 
        where <span class="literal">'M'</span> is the major version number, <span class="literal">'m'</span> 
        the minor version number, <span class="literal">'rr'</span> the release 
        number and <span class="literal">'bbbb'</span> the build number).</p></td>
    <td class="table_cells"><p>yes</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__STDC_VERSION__</code></td>
    <td class="table_cells"><p>199901L (a decimal constant), this is defined in 
        C99 mode only</p></td>
    <td class="table_cells"><p>yes</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__WAVE_HAS_VARIADICS__</code></td>
    <td class="table_cells"><p>1 (a decimal constant), this is defined in C++ 
        mode only, if variadics and placemarkers are enabled, further it is defined 
        in C99 and C++0x modes</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__STDC_GLOBAL__</code></td>
    <td class="table_cells"><p>1 (a decimal constant), this is defined in C++0x 
        mode only and only at global macro scope</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__STDC_CURRENT_REGION__</code></td>
    <td class="table_cells"><p>The name of the current active macro region (a 
        string literal). This constant does not contain the full qualified scope 
        name, but only it's last part. This macro is defined in C++0x mode only.</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
  <tr> 
    <td class="table_cells"><code>__STDC_FULL_REGION__</code></td>
    <td class="table_cells"><p>The name of the current active macro region (a 
        string literal). This constant does contain the full qualified scope name, 
        not only it's last part. This macro is defined in C++0x mode only.</p></td>
    <td class="table_cells"><p>no</p></td>
  </tr>
</table>
<br>
<table border="0">
  <tr> 
    <td width="10"></td>
    <td width="30"><a href="index.html"><img src="theme/u_arr.gif" border="0"></a></td>
    <td width="30"><a href="class_reference_inputpolicy.html"><img src="theme/l_arr.gif" width="20" height="19" border="0"></a></td>
    <td width="30"><a href="supported_pragmas.html"><img src="theme/r_arr.gif" border="0"></a></td>
  </tr>
</table>
<hr size="1">
<p class="copyright">Copyright &copy; 2003-2004 Hartmut Kaiser<br>
  <br>
  <font size="2">Use, modification and distribution is subject to 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>
<span class="updated">Last updated: 
  <!-- #BeginDate format:fcAm1m -->Monday, January 5, 2004  14:57<!-- #EndDate -->
  </span></body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Hartmut Kaiser

United States United States
Actively involved in Boost and the development of the Spirit parser construction framework.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 11 Jan 2004
Article Copyright 2003 by Hartmut Kaiser
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid