I know that there are few threads in this thread. But what really confused me - the result I got is different from what everyone says.
Check out this code below (compiled using GCC441):
Result:
B: B: Dtor-B Dtor-A Dtor-B Dtor-A
If the virtual function is not allowed in the template class, why did I get this result?
source share