More docs on %template

This commit is contained in:
William S Fulton 2017-08-09 20:54:32 +01:00
parent 1434449041
commit 8bf81b8718
1 changed files with 14 additions and 0 deletions

View File

@ -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&lt;int&gt; ListOfInt;
%template(intList) List&lt;int&gt;; // ok
%template(intList) ListOfInt; // illegal - Syntax error
</pre>
</div>
<H3><a name="SWIGPlus_template_functions">6.18.2 Function templates</a></H3>