Variadic templates doc update
This commit is contained in:
parent
ac74c90fb0
commit
34d46510cf
1 changed files with 12 additions and 8 deletions
|
|
@ -511,23 +511,27 @@ public:
|
|||
}
|
||||
</pre></div>
|
||||
|
||||
<p>Support for the variadic sizeof() function was also introduced:</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
const int SIZE = sizeof...(ClassName<int, int>);
|
||||
</pre></div>
|
||||
|
||||
<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<> // zero argument not supported
|
||||
%template(MyVariant1) ClassName<> // zero argument not supported yet
|
||||
%template(MyVariant2) ClassName<int> // ok
|
||||
%template(MyVariant3) ClassName<int, int> // too many arguments
|
||||
%template(MyVariant3) ClassName<int, int> // too many arguments not supported yet
|
||||
</pre></div>
|
||||
|
||||
<p>Support for the variadic <tt>sizeof()</tt> function is correctly parsed:</p>
|
||||
|
||||
<div class="code"><pre>
|
||||
const int SIZE = sizeof...(ClassName<int, int>);
|
||||
</pre></div>
|
||||
|
||||
<p>
|
||||
In the above example <tt>SIZE</tt> is of course wrapped as a constant.
|
||||
</p>
|
||||
|
||||
<H3><a name="Cpp0x_New_string_literals"></a>7.2.18 New string literals</H3>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue