模板和托管代码 [英] templates and managed code

查看:73
本文介绍了模板和托管代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有计划在(近)

未来支持托管代码模板?例如,VS.NET 2005 ......:)

解决方案

Peter Oliphant写道:

是否有任何计划在(近)
未来支持托管代码模板?例如,VS.NET 2005 ......:)




模板总是(即来自VS 2002 / 7.0版本)

托管代码支持。


从VS 2005 / 8.0

版本开始支持CLR类型的模板。


Ronald Laeremans

Visual C ++团队


嘿Peter


http://www.codeproject.com/managedcpp/whycppcli.asp


请参阅标题为托管模板的部分


-

问候,

Nish [VC ++ MVP]

" Peter Oliphant" < PO ******* @ RoundTripInc.com>写在消息

新闻:OU ************** @ TK2MSFTNGP10.phx.gbl ...

有没有计划在(近)
未来支持托管代码模板?例如,VS.NET 2005 ...:)



template< int x>

class X {}; //很好


模板< int y>

__gc classY {}; //错误C3151''__ gc''不能应用于模板


你的意思是''模板一直支持''如果简单的

上面的代码会产生一个错误,具体说你不能使用''__gc''和

a模板? [我正在使用VC ++ .NET的2003专业版]


我想我不知道什么是CLR类型......:)

Ronald Laeremans [MSFT]" < RO ***** @ online.microsoft.com>写在消息

新闻:%2 *************** @ TK2MSFTNGP10.phx.gbl ...

Peter Oliphant写道:

是否有计划在(近)
未来支持托管代码模板?例如,VS.NET 2005 ... :)



托管代码中始终支持模板(即来自VS 2002 / 7.0版本)。

从VS 2005 / 8.0
版本开始支持CLR类型的模板。

Ronald Laeremans
Visual C ++团队



Is there any plan to support templates with managed code in the (near)
future? For instance, VS.NET 2005... : )

解决方案

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


Hey Peter

See http://www.codeproject.com/managedcpp/whycppcli.asp

See the section titled "Managed templates"

--
Regards,
Nish [VC++ MVP]
"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:OU**************@TK2MSFTNGP10.phx.gbl...

Is there any plan to support templates with managed code in the (near)
future? For instance, VS.NET 2005... : )



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 [MSFT]" <ro*****@online.microsoft.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...

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



这篇关于模板和托管代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆