#include "stdafx.h"
interface class I
{
void f();
};
generic where T : I
ref class MyGenericClass
{
T t;
public:
MyGenericClass(T t_in) : t(t_in)
{
t->f();
}
};
ref class C : I
{
public:
virtual void f()
{
}
};
int main()
{
MyGenericClass^ r = gcnew MyGenericClass(gcnew C());
}