Код: Выделить всё
template
class Serializable
{
public:
void Serialize();
};
template
void Serializable::Serialize()
{
// accessing the member variable we're pointing to, to do stuff with it
}
Код: Выделить всё
class Foo : public Serializable //
Подробнее здесь: [url]https://stackoverflow.com/questions/78757135/member-pointer-template-parameter-pointing-into-the-object-being-templated[/url]