STL in a Windows Forms app in VS 2005

  • Thread starter Thread starter Jürgen Devlieghere
  • Start date Start date
J

Jürgen Devlieghere

What are the options when keeping e.g. a list of objects in a windows forms
application?

The main form should be managed, since it derives from
System::Windows::Forms::Form
If this class needs also a list of other managed objects, one cannot use std
STL. The logical answer would be STL.NET, but VS 2005 beta2 seems to have no
STL.NET support at all.

Explicit casting of all objects in a list seems hardly an option: strong
typing is after all one of the keys to solid programming.

We use STL very extensively, and I can hardly imagine any of our programs
without it. Is there a solid migration path to managed code?

Jürgen Devlieghere
 
Jürgen Devlieghere said:
What are the options when keeping e.g. a list of objects in a windows
forms application?

The main form should be managed, since it derives from
System::Windows::Forms::Form
If this class needs also a list of other managed objects, one cannot
use std STL. The logical answer would be STL.NET, but VS 2005 beta2
seems to have no STL.NET support at all.

It does. Try #include <cliext/vector> and cliext::vector<T>.

-cd
 
Carl said:
It does. Try #include <cliext/vector> and cliext::vector<T>.

-cd

The public Beta 2 DVD image on MSDN certainly doesn't have that. I see
no cliext directory on my entire hard disk, and no vector file other
than the unmanaged STL, and even if I do a grep in all files on my VS
directory, I can't find cliext anywhere. Is it a downloadable add-on?

Tom
 
Tamas said:
The public Beta 2 DVD image on MSDN certainly doesn't have that. I see
no cliext directory on my entire hard disk, and no vector file other
than the unmanaged STL, and even if I do a grep in all files on my VS
directory, I can't find cliext anywhere. Is it a downloadable add-on?

Interesting. It's in my beta 2 installation. Maybe it's in the Team System
DVD image (which is what I installed), but not in the others.

-cd
 
Carl Daniel said:
Interesting. It's in my beta 2 installation. Maybe it's in the Team
System DVD image (which is what I installed), but not in the others.

-cd

Daniel,

Yes, it's only in the TS distro. Last thing I heard about this was that it's
alpha code which has been included by mistake. The Beta of STL.NET is
intended to come whith VS2005 - RTM, the STL.NET RTM version will be made
available sometime early 2006 as a web download.

Willy.
 
Willy said:
"Carl Daniel [VC++ MVP]"

Daniel,

Yes, it's only in the TS distro. Last thing I heard about this was
that it's alpha code which has been included by mistake. The Beta of
STL.NET is intended to come whith VS2005 - RTM, the STL.NET RTM
version will be made available sometime early 2006 as a web download.

Yeah. that's what I read yesterday too. Bummer.

-Carl
 
Willy said:
Yes, it's only in the TS distro. Last thing I heard about this was that it's
alpha code which has been included by mistake. The Beta of STL.NET is
intended to come whith VS2005 - RTM, the STL.NET RTM version will be made
available sometime early 2006 as a web download.

Willy.

Thank you for the information.

Tom
 
Thanks. That means VS 2005 is for most C++ users not something for 2005 :-)

Jürgen Devlieghere
 
Jürgen Devlieghere said:
Thanks. That means VS 2005 is for most C++ users not something for
2005 :-)

Not so. It means that you'll have to limit your use of STL to native code
and be content with the framework classes for managed. There's still plenty
of new and useful stuff in C++ 2005 for many developers to switch over.

-cd
 
Back
Top