473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Managed c++ template.

Hello,

how does one create a managed c++ template?

The following doesn't seem to be the correct syntax:

template<typename T> public __gc class TestClass{...}; // Compiler error:
"Syntax error: '<end Parse>'"

Thank you for any answers,

me.
Jul 21 '05 #1
2 1391
>
how does one create a managed c++ template?

The following doesn't seem to be the correct syntax:

template<typename T> public __gc class TestClass{...}; // Compiler error:
"Syntax error: '<end Parse>'"


Templates are not supported on __gc or __value classes on MC++, so that
won't work. They are supported (with a few gotcha's) on the C++/CLI syntax
coming on in Visual Studio 2005, though...

--
Tomas Restrepo
to****@mvps.org
Jul 21 '05 #2
That is dissapointing.

Well, thanks for the info,

me.
"Tomas Restrepo (MVP)" <to****@mvps.org> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...

how does one create a managed c++ template?

The following doesn't seem to be the correct syntax:

template<typename T> public __gc class TestClass{...}; // Compiler error: "Syntax error: '<end Parse>'"


Templates are not supported on __gc or __value classes on MC++, so that
won't work. They are supported (with a few gotcha's) on the C++/CLI syntax
coming on in Visual Studio 2005, though...

--
Tomas Restrepo
to****@mvps.org

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: amey kale | last post by:
i want to create template in managed c++. i have created code like this-- template<class t> void function(t a __gc) {.........}
4
by: Morten Overgaard | last post by:
Hi I'm getting the following warning warning C4669: 'reinterpret_cast' : unsafe conversion: 'CMFCShellDoc' is a managed type object CMFCShellDoc is derived from COleServerDoc which is NOT...
0
by: Daniel G?rsch | last post by:
The following code works perfect in VS 2002 (compiled in a console project). Using VS 2003 the variable 'a' in the 'compute' function of the managed class 'M' is not correctly passed into this...
2
by: Jason | last post by:
I am porting code from c++ and would like to use managed c++ to turn it into an assembly for c#. The c++ code uses templates heavily ( via custom STL containers ) and from what I read so does...
1
by: slugster | last post by:
Hi, i originally posted this via another portal, but after giving it time to propagate it still hasn't shown up. My apologies for the multiposting. This might be a very simple question, but i...
11
by: Peter Oliphant | last post by:
Is there any plan to support templates with managed code in the (near) future? For instance, VS.NET 2005... : )
2
by: Rune Vistnes | last post by:
Hey, I am trying to wrap an unmanaged library in managed c++ so that I can use this library in other .NET languages, such as C#. I've been successful for the most part this far, but I'm having a...
7
by: cortfr | last post by:
If I compile the following code in my managed c++ dll... public ref class foo { public: void doSomething() { } }; public ref class bar { }; and then inspect the resulting dll using...
1
by: pikulsky | last post by:
There is a managed C++ class (ManagedClass) defined in one library (TestMCpp.dll), it has a method (funcTemplate) with template native type (NativeTemplate<int>). This library is built without any...
12
by: DaTurk | last post by:
Hi, I have a rather interesting problem. I have a unmanged c++ class which needs to communicate information to managed c++ via callbacks, with a layer of c# on top of the managed c++ ultimatley...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.