An Update to STL/CLR is Complete!

Hello everyone,

I am excited to announce that the Visual C++ libraries team has completed another major update of STL/CLR and integrated it with Visual C++ Orcas. Depending on the schedule of internal integrations, you should expect to see this new version of STL/CLR in the February or March CTP for Visual Studio (codename Orcas). We are also working on updating the STL/CLR specification online at MSDN. Please check the site close to the end of January for the latest version of the specification.

Below is a brief summary of major improvements in this update compared to the version of STL/CLR in September CTP:

-          We completed implementation of collection adapters, which provide a unified mechanism to adapt IEnumerable, ICollection, IList and IDictionary .Net Framework interfaces and their generic counterparts as an STL/CLR container. These adapters provide iterators that are compatible with STL/CLR algorithms. Both adapters and iterators can only be used within one .Net assembly and it is not supported to pass them from .Net assembly to another one. Here is a quick sample of using such an adapter:

#include <cliextadapter>

using namespace System::Collections::Generic;

void Function( IList<int>^ list )


    cliext::collection_adapter< IList<int> > cont(list);


    cliext::list<int> myList(cont.size());



-          We introduced an iterator range adapter called make_collection(). It represents an iterator range (pair) as .Net Framework ICollection/IEnumerable interface and their generic counterparts. It can only be used for reading the data from the container that is represented by two iterators passed it when the adapter was created.  Here is another quick example of how to use it:

#include <cliextadapter>

using namespace System::Collections;

using namespace cliext;

    ICollection^ piColl = make_collection<_MyIter_t>(vect.begin(), vect.end());

    Generic::ICollection<_MyIter_t::value_type>^ piColl2 = make_collection<_MyIter_t> (itFirst, itLast);

-          STL/CLR assembly (Microsoft.VisualC.Stlclr.Dll) is not part of .Net Framework 3.5 and it will be available on any machine that has .Net Fx 3.5 installed.

-          We have updated implementation of IDictionary<> and IDictionary<K,T> on cliext::map<> and cliext::hash_map<>.

-          We have slightly changed implementation of cliext::pair<> to make its behavior even more similar to std::pair from STL library.

-          Act on every customer reported issue, which resulted in several fixes and design changes. Thanks for your feedback, keep sending it to us!

At this stage, STL/CLR is what we call “feature complete” for the Orcas release, meaning that all parts of initial design are implemented and tested. For the rest of Orcas product cycle, the team is going to work on customer reported issues and small design changes if such are reported by customers. Major design changes most likely have to wait till the next release, but please still keep sending us your ideas and suggestions on how we can improve STL/CLR.

If you have started to think about using STL/CLR, please be sure to give it when released in the CTP for the Visual Studio Orcas. As always if you have any feedback, please let us know. You may either open reports on the  Connect site or post comments here.  We are looking forward to hearing from you!

Nikola Dudar

Program Manager

Visual C++ Team