SWIG does now support use of some constant expressions as template parameters

so update the documentation.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9683 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2007-04-18 16:24:46 +00:00
commit 2d962ac1f2

View file

@ -2816,14 +2816,17 @@ void bar(list<int,100> *x);
</div> </div>
<p> <p>
There are some restrictions on the use of non-type arguments. Specifically, There are some restrictions on the use of non-type arguments. Simple literals
they have to be simple literals and not expressions. For example: are supported, and so are some constant expressions. However, use of '&lt;'
and '&gt;' within a constant expressions currently is not supported by SWIG
('&lt;=' and '&gt;=' are though). For example:
</p> </p>
<div class="code"> <div class="code">
<pre> <pre>
void bar(list&lt;int,100&gt; *x); // OK void bar(list&lt;int,100&gt; *x); // OK
void bar(list&lt;int,2*50&gt; *x); // Illegal void bar(list&lt;int,2*50&gt; *x); // OK
void bar(list&lt;int,(2&gt;1 ? 100 : 50)&gt; *x) // Not supported
</pre> </pre>
</div> </div>