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:
parent
da6027a918
commit
2d962ac1f2
1 changed files with 7 additions and 4 deletions
|
|
@ -2816,14 +2816,17 @@ void bar(list<int,100> *x);
|
|||
</div>
|
||||
|
||||
<p>
|
||||
There are some restrictions on the use of non-type arguments. Specifically,
|
||||
they have to be simple literals and not expressions. For example:
|
||||
There are some restrictions on the use of non-type arguments. Simple literals
|
||||
are supported, and so are some constant expressions. However, use of '<'
|
||||
and '>' within a constant expressions currently is not supported by SWIG
|
||||
('<=' and '>=' are though). For example:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
void bar(list<int,100> *x); // OK
|
||||
void bar(list<int,2*50> *x); // Illegal
|
||||
void bar(list<int,100> *x); // OK
|
||||
void bar(list<int,2*50> *x); // OK
|
||||
void bar(list<int,(2>1 ? 100 : 50)> *x) // Not supported
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue