|
Boost Users : |
Subject: [Boost-users] [MPL] Generate template instantiation ?
From: Olivier Tournaire (olitour_at_[hidden])
Date: 2008-10-06 12:59:55
Hi all,
I have a class templated on 2 arguments, e.g. :
template <typename PixelType , typename NbChannels> class myClass
{
// ...
};
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 :
template class myClass<unsigned char,1>;
template class myClass<unsigned char,2>;
// ...
template class myClass<unsigned char,10>;
template class myClass<signed char,1>;
template class myClass<signed char,2>;
// ...
template class myClass<signed char,10>;
And so on. Is there a way to do this without writing all possiblities. Maybe
with the MPL ?
Best regards,
Olivier
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net