<div dir="ltr">Hi all,<br><br>I have a class templated on 2 arguments, e.g. :<br><br>template &lt;typename PixelType , typename NbChannels&gt; class myClass<br>{<br>&nbsp;&nbsp;&nbsp; // ...<br>};<br><br>This class is in a lib, and I would like to instantiate it for all base type (signed char, unsigned char, int, unsigned int ...), and for a given number of channels. For example :<br>
<br>template class myClass&lt;unsigned char,1&gt;;<br>template class myClass&lt;unsigned char,2&gt;;<br>// ...<br>template class myClass&lt;unsigned char,10&gt;;<br><br>template class myClass&lt;signed char,1&gt;;<br>
template class myClass&lt;signed char,2&gt;;<br>
// ...<br>
template class myClass&lt;signed char,10&gt;;<br><br>And so on. Is there a way to do this without writing all possiblities. Maybe with the MPL ?<br><br>Best regards,<br><br>Olivier<br></div>