More docs on %template
This commit is contained in:
parent
1434449041
commit
8bf81b8718
1 changed files with 14 additions and 0 deletions
|
|
@ -3109,6 +3109,20 @@ not necessary to instantiate a new class for the type <tt>Integer</tt> (doing so
|
|||
redundant and will simply result in code bloat).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The template provide to <tt>%template</tt> for instantiation must be the actual template and not a typedef to a template.
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
typedef List<int> ListOfInt;
|
||||
|
||||
%template(intList) List<int>; // ok
|
||||
%template(intList) ListOfInt; // illegal - Syntax error
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<H3><a name="SWIGPlus_template_functions">6.18.2 Function templates</a></H3>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue