Document strings in preprocessor expressions

These appear to have been supported for at least 20 years and are used
in SWIG's library files.
This commit is contained in:
Olly Betts 2022-02-24 09:39:21 +13:00
commit 4db4b999ca

View file

@ -99,8 +99,23 @@ header files without generating any wrappers.
<p>
SWIG fully supports the use of <tt>#if</tt>, <tt>#ifdef</tt>,
<tt>#ifndef</tt>, <tt>#else</tt>, <tt>#endif</tt> to conditionally
include parts of an interface. The following symbols are predefined
by SWIG when it is parsing the interface:
include parts of an interface.
</p>
<p>
SWIG's preprocessor conditionals support the standard C/C++ preprocessor
integer expressions. As a SWIG-specific extension, string equality and
inequality tests are also supported, for example:
</p>
<div class="code">
<pre>
#if defined __cplusplus && (#__VA_ARGS__ != "" || #TYPE == "void")
</pre>
</div>
<p>
The following symbols are predefined by SWIG when it is parsing the interface:
</p>
<div class="code"><pre>