templates may not be ‘virtual’

后端 未结 4 942
清酒与你
清酒与你 2021-02-18 18:47

Given the code below, the compiler is showing a message pointing that error: templates may not be ‘virtual’. Does anyone have a suggestion on how to solve the bug?<

4条回答
  •  无人及你
    2021-02-18 19:41

    Well, the error message is pretty clear. Member function templates can't be virtual. How to solve this depends on your problem, but the easiest thing to do would be to make the member functions non-virtual and reconsider your design.

提交回复
热议问题