Update variadic templates
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b9fd49858d
commit
6a43934ece
2 changed files with 20 additions and 11 deletions
|
|
@ -500,7 +500,7 @@ union P {
|
|||
<H3><a name="Cpp0x_Variadic_templates"></a>7.2.17 Variadic templates</H3>
|
||||
|
||||
|
||||
<p>SWIG fully supports the variadic templates syntax (inside the <>
|
||||
<p>SWIG supports the variadic templates syntax (inside the <>
|
||||
block, variadic class inheritance and variadic constructor and
|
||||
initializers) with some limitations. The following code is correctly parsed:</p>
|
||||
|
||||
|
|
@ -517,11 +517,13 @@ public:
|
|||
const int SIZE = sizeof...(ClassName<int, int>);
|
||||
</pre></div>
|
||||
|
||||
<p>For now however, the <tt>%template</tt> directive only accepts at most the number of
|
||||
arguments defined in the original template<> block:</p>
|
||||
<p>
|
||||
For now however, the <tt>%template</tt> directive only accepts one parameter substitution
|
||||
for the variable template parameters.
|
||||
</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
%template(MyVariant1) ClassName<> // ok
|
||||
%template(MyVariant1) ClassName<> // zero argument not supported
|
||||
%template(MyVariant2) ClassName<int> // ok
|
||||
%template(MyVariant3) ClassName<int, int> // too many arguments
|
||||
</pre></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue