
Thanks Roland and Jeff!
I tried the not_ <> template and I don't know why I didn't get it to work the first time. Works fine now anyway!
Also tried the "nested_template" metafunction forwarding technique but never got that to work even though I did try some variations on the theme.
So I ended up with using the "automatic deduction of template parameters" approach (suggested by Jeff and shown below) and I'm quite happy with it since it improves readability compared to the "is_base_of" template (IMHO).
Thanks again!
// Magnus
struct yes_tag { char _[42]; };
struct no_tag { char _[1]; };
template< class T > T* declptr();
template< class T >
struct is_B_base_of
{
template< class D, class U >
static yes_tag test(B