Skip to content

Commit 4db4b99

Browse files
committed
Document strings in preprocessor expressions
These appear to have been supported for at least 20 years and are used in SWIG's library files.
1 parent 74d12d8 commit 4db4b99

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Doc/Manual/Preprocessor.html

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,23 @@ <H2><a name="Preprocessor_condition_compilation">11.3 Conditional Compilation</a
9999
<p>
100100
SWIG fully supports the use of <tt>#if</tt>, <tt>#ifdef</tt>,
101101
<tt>#ifndef</tt>, <tt>#else</tt>, <tt>#endif</tt> to conditionally
102-
include parts of an interface. The following symbols are predefined
103-
by SWIG when it is parsing the interface:
102+
include parts of an interface.
103+
</p>
104+
105+
<p>
106+
SWIG's preprocessor conditionals support the standard C/C++ preprocessor
107+
integer expressions. As a SWIG-specific extension, string equality and
108+
inequality tests are also supported, for example:
109+
</p>
110+
111+
<div class="code">
112+
<pre>
113+
#if defined __cplusplus && (#__VA_ARGS__ != "" || #TYPE == "void")
114+
</pre>
115+
</div>
116+
117+
<p>
118+
The following symbols are predefined by SWIG when it is parsing the interface:
104119
</p>
105120

106121
<div class="code"><pre>

0 commit comments

Comments
 (0)