Why I can’t do this:
//in class B:
TSubclassOf<A> B::GetClass() {..}
//somewhere else:
void foo (A* pa, B* pb)
{
TSubclassOf<A> type = pb->GetClass();
auto pab = Cast< type >(pa); // <<< compiler error here
}
I get compiler error:
(1845): error C2974: ‘Cast’ : invalid
template argument for ‘T’, type
expected