P
Peter Oliphant
Is there any plan to support templates with managed code in the (near)
future? For instance, VS.NET 2005... : )
future? For instance, VS.NET 2005... : )
Peter said:Is there any plan to support templates with managed code in the (near)
future? For instance, VS.NET 2005... : )
Peter said:template< int x >
class X {} ; // just fine
template< int y >
__gc classY{} ; //error C3151 '__gc' can't be applied to a template
What do you mean by 'templates have always been supported' if the
simple code above generates an error specifically saying you can't
use '__gc' with a template? [ I'm using the 2003 pro version of
VC++.NET]
I guess I don't know what a CLR type is... : )
Peter Oliphant said:template< int x >
class X {} ; // just fine
template< int y >
__gc classY{} ; //error C3151 '__gc' can't be applied to a template
What do you mean by 'templates have always been supported' if the simple
code above generates an error specifically saying you can't use '__gc'
with a template? [ I'm using the 2003 pro version of VC++.NET]
I guess I don't know what a CLR type is... : )
Ronald Laeremans said:Templates have always (i.e. from the VS 2002 / 7.0 version) been
supported in managed code.
Templates on CLR types are supported starting with the VS 2005 / 8.0
versions.
Ronald Laeremans
Visual C++ team
Nishant Sivakumar said:Managed templates are supported starting VC++ 2005 (and I believe it's
only for the new syntax).
VC++ 2003 did not support managed templates. But, what Ronald meant is
that your native templates would compile with /clr turned on - doesn't
mean you can have __gc template classes.
--
Regards,
Nish [VC++ MVP]
Peter Oliphant said:template< int x >
class X {} ; // just fine
template< int y >
__gc classY{} ; //error C3151 '__gc' can't be applied to a template
What do you mean by 'templates have always been supported' if the simple
code above generates an error specifically saying you can't use '__gc'
with a template? [ I'm using the 2003 pro version of VC++.NET]
I guess I don't know what a CLR type is... : )
Ronald Laeremans said:Peter Oliphant wrote:
Is there any plan to support templates with managed code in the (near)
future? For instance, VS.NET 2005... : )
Templates have always (i.e. from the VS 2002 / 7.0 version) been
supported in managed code.
Templates on CLR types are supported starting with the VS 2005 / 8.0
versions.
Ronald Laeremans
Visual C++ team
Cool that it will be supported in 2005 (which will be released when? It's
close to needing a name change to 2006...lol)...
Will multiple-inheritance for managed (__gc) classes also be supported
perchance? In this case I would assume, if it's allowed at all, that when
creating a new managed multiple-inheritance class it would allow the use of
only *managed* base classes as parents...
Or is there a way to do managed multiple-inheritance now?
Peter said:Cool that it will be supported in 2005
Managed C++ allows only interface multiple-inheritance and class singleWill multiple-inheritance for managed (__gc) classes also be supported
perchance?
You can multiple-inherits from interfaces. ImplementationOr is there a way to do managed multiple-inheritance now?
(unfortunately IMHO) share most of their syntax. Mainly, generics do
not support specialization (partial or total), nor dependent types
definition/inference. On the other side, generics use a mechanism to
restrict what instanciations are authorized for a given "template".
Nishant said:I wasn't talking about generics - I was talking about managed
templates which support specialization, derivation from the template
parameter type etc.
I know, but I was not sure that Peter Oliphant was aware of the
difference.