Original Post
Lets say I have the code: So I need a cpy ctr from class C to class B? However, I want to have the cpy ctr only between inherited classes and not between any two calsses. Is this possible?
template <class T>
class A {
};
class B {
};
class C: public B{
}
class D {
};
void foo (A<B> arg)
{
}
A<C> test;
A<D> test2;
foo (test) // <= Ok
foo (test2) // <= Compilation error