C++ Template Virtual Function - Go ahead, try it yourself. Virtual template function is not allowed. First, you cannot have virtual template functions. You could make an interface using virtual. No compiler will accept the following code: Virtual function templates are not possible in c++. I know this isn't legal c++ due to. As templates are resolved at compile time, virtual will not work, as the. However you can use one or the other here.
Virtual function templates are not possible in c++. However you can use one or the other here. First, you cannot have virtual template functions. No compiler will accept the following code: You could make an interface using virtual. Go ahead, try it yourself. Virtual template function is not allowed. I know this isn't legal c++ due to. As templates are resolved at compile time, virtual will not work, as the.