There are several classes, and their relationships are as follows:
class X:A,B
class Y:A,B
class Z:A,B
I want to pass a generic type that will inherit from A and B to testFunction using a template. My code is as follows:
template<template T:public A, public B>
void testFunction(T generalType)
{
}
but my compiler told me that this is an error pattern. How can i fix this?
source
share