STL.NET in VC++ 2005 Beta 2

Anson Tsao says it was an accidental inclusion and Ronald Laeremans says it isn’t within an order of the magnitude of the performance that they wanted to ship it with. Anson said that the idea is to release STL/CLR (or STL.NET) as a beta (downloadable off the web) around the time VC++ 2005 is finally released, and to release the final version a little later (again off the web). This means, STL.NET will not be part of VC++ 2005 installer when it gets released, but will be a separate add-on like library. Possibly, by Orcas it’ll be mature enough to be distributed as part of the full VC++ suite. I do hope it doesn’t go the WTL way (WTL might have succeeded in many ways, but it’s still pretty much an orphan compared to MFC and ATL).

Possibly proving Anson’s idea that it was included by accident are comments in the code such as the one shown below :-

/* Copyright (c) 2004-2005 by Dinkumware, Ltd. */

Anyway, I personally was very thrilled at its inclusion and at being able to play with it – something I’ve been wanting to do ever since Stan Lippman started blogging about STL.NET (and later he wrote that MSDN article whose title I forget at the moment). Not being an STL guy (at least not until now), I am unable to compare it with native STL, but it looks good to my pretty newbie-ish STL awareness levels.

BTW, here’s three ways to iterate through a string (the comments say what each iteration is based on) :-

string s = "Hello world";

//Using the ICollection<> interface
for each(wchar_t c in s)
{
   Console::Write(c);
}
Console::WriteLine();

//Using the default indexed property
for(int i=0; i<s.Count; i++)
{
   Console::Write(s[i]);
}
Console::WriteLine();

//Using iterators
for(string::iterator i = s.begin(); i != s.end(); i++)
{
   Console::Write(*i);
}
Console::WriteLine();

Alright, I know I am sounding like a 7 year old who got his first bike, but that’s how I’ve been feeling like ever since I installed Beta 2 😀

Advertisements

12 thoughts on “STL.NET in VC++ 2005 Beta 2

  1. BTW, I’ve heard some rumors about a WTL-like library on top of Avalon. Is it still on the table?

  2. The following code produces a compiler error C2385. Any idea as to how to resolve this? Thanks for your help.

    #include
    using namespace System;

    Test::Test(void)
    {
    cliext::map ^wordOccur = gcnew cliext::map;
    }

  3. The prior comment did not contain the complete #include. Here is the code again.

    #include
    using namespace System;

    Test::Test(void)
    {
    cliext::map ^wordOccur = gcnew cliext::map;
    }

  4. Hi Nish,

    I recently downloaded the 2005 Beta 2. Neither my compiler nor I can find the “STL.NET” includes, for example
    #include

    Much obliged if you can you tell me how to get some code up and running with C++/CLI and STL.NET?

  5. oops my previous post was meant to show
    #include *cliext/vector*
    where instead of * we have the angle brackets….
    (i’ve also tried cli/vector to no avail)

  6. Ok – nice that you cleared it up – I’d have been pretty confused too anyway.

    BTW to get the greater-than and lesser-then signs to show,
    you need to use &lt; and &gt; which will show up as < and >

    Regards,
    Nish

  7. Scary to think that they are only including certain libraries in the team system now,
    which for other than the static anaysis tools I don’t want to use. What are they thinking
    trying to browbeat developers into going for the top everything. Probably a sign of things
    to come now borland is dead.

    I don’t want to use their crappy team system, but I so what to make sure I have all the
    libraries avaliable. Otherwise you can’t expect to be able to share code with other people
    unless they are eaqually tooled up. Whats the point in having a Pro version, if its not
    fully functional?

    None of their comparison notes on MSDN highlight this stuff either:

    http://msdn.microsoft.com/howtobuy/vs2005/subscriptions/compare/

    Where does it say here they have removed library functionality?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s