I found that the STL.NET published with VS Beta2, but what is the meaning of
STL.NET.
Is it just a simple wrapper to replace the old std stl?
I can find nothing new but the keyword 'Generate' to replace 'Template',and
the keyword 'gcnew' to replace 'new'.
So, could you tell me what's the meaning of STL.NET.
I really think it is still very ugly.
adebaene@club-internet.fr - 05 Jul 2005 09:00 GMT
KevinLee a écrit :
> I found that the STL.NET published with VS Beta2, but what is the meaning of
> STL.NET.
> Is it just a simple wrapper to replace the old std stl?
Not exactly. It's a version of the STL that is compatible with .NET
CLI/C++ code : More precisely, STL.NET container can contains gc
objects : Hence you can do:
map<String^, MyObject^> MyMap; for example.
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/stl
-netprimer.asp
for a presentation on the subject.
> I can find nothing new but the keyword 'Generate' to replace 'Template',and
> the keyword 'gcnew' to replace 'new'.
>
> So, could you tell me what's the meaning of STL.NET.
> I really think it is still very ugly.
What do you mean by "still" very ugly? Why?
Arnaud
MVP - VC
Bo Persson - 05 Jul 2005 16:21 GMT
>I found that the STL.NET published with VS Beta2, but what is the
>meaning of STL.NET.
>
> Is it just a simple wrapper to replace the old std stl?
It is not a simple wrapper, and it is not a replacement, it is an
addition.
Visual C++ supports to different C++ languages:
- ISO Standard C++, including the C++ standard library
- ECMA C++/CLR, with STL.NET
These are two different languages, that just looks similar (and with
similar names).
> I can find nothing new but the keyword 'Generate' to replace
> 'Template',and the keyword 'gcnew' to replace 'new'.
C++/CLR also has a 'generic' keyword, which is totally different from
'template'. It's another language, just like Java or C#.
> So, could you tell me what's the meaning of STL.NET.
> I really think it is still very ugly.
To get stl support for managed C++, just like the C++ standrad library
supports it for native C++.
Bo Persson
Tamas Demjen - 05 Jul 2005 18:19 GMT
> Is it just a simple wrapper to replace the old std stl?
It's a wrapper around .NET containers. The idea is that C++ programmers
are very used to the STL and its syntax. We find it easy and familiar.
STL.NET allows us to access managed containers with a close-to-STL syntax.
> I really think it is still very ugly.
What's ugly, STL or .NET? If you find STL ugly, don't use STL.NET, use
.NET containers directly. If you find MC++ ugly, learn the new C++/CLI
syntax.
Tom
Nishant Sivakumar - 12 Jul 2005 05:03 GMT
To add to what others have said, note that STL.NET (or STL/CLI) is not a CLI
wrapper around STL, it's a full implementation in managed code that uses
generics and templates.

Signature
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com
>I found that the STL.NET published with VS Beta2, but what is the meaning
>of STL.NET.
[quoted text clipped - 5 lines]
> So, could you tell me what's the meaning of STL.NET.
> I really think it is still very ugly.