I have a templated class
template< std::size_t Size >
class Buffer
{
....
};
I’d like to prevent instantiation of this template when the Size argument is zero. i.e. generate a compiler warning for the following.
Buffer< 0 > buf;
but all other variants would work.
Buffer< 10 > buf;
I’m looking at using boost::enable_if_c but I don’t understand how to get it working.
–Update–
I can’t use any c++11 features, unfortunately
Utilizing
BOOST_STATIC_ASSERTmight be even easier: