AFAIK #pragma make_public
supports only native non-template types.
But, is there some other way to make template type as public?
AFAIK #pragma make_public
supports only native non-template types.
But, is there some other way to make template type as public?
No. But read here for some workarounds:
Best workaround for compiler error C2158: make_public does not support native template types
http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/b43cca63-b0bf-451e-b8fe-74e9c618b8c4/
Templates don't have external linkage. Not in native C++, not in C++/CLI either. You solve it the same way, put them in a .h header file and #include it in any source file where you want to use the template. They are of course not available to any other managed code that isn't written in C++/CLI.
Do favor the generic keyword in C++/CLI, generics in managed code do have the equivalent of external linkage.