21 Aug
2007
21 Aug
'07
5:51 p.m.
on Tue Aug 21 2007, Martin Apel
Hughes, James wrote:
Hello all,
I want some template code to assert if the passed in template type is NOT derived from a particular base class.
I've looked through the Template Metaprogamming book, but haven't seen anything that can do this, but I seem to remember something along those lines.
Can anyone help?
James
Hi James,
the easiest way is something like the following:
#include
#include BOOST_STATIC_ASSERT (boost::is_base_of
::value);
BOOST_MPL_ASSERT((boost::is_base_of