After lot of struggle I realized that a STL is easy to use with the managed c++. What is needed is an unmanaged wrapper for your managed class which will hold the handle to the managed object. And functions for comparing/evaluating for the STL algorithms. I got so frustrated with the MC++ that I overlooked some of the commonly used workarounds.
Is anyone interested in developing stl for Managed C++.
I know that Dinkumware is coming up with STL.NET but its meant for specifically VS.NET2005.
But my application is already written in VC++ 7.0 and I am not ready to port it "again" to VS.NET 2005.
With all the resources available to Microsoft and Dinkumware, STL.NET is yet not ready, so it's obviosuly a non-trivial task. It may be simpler to port your MC++ code to C++/CLI than to write a version of STL for VS 2003. I also believe that managed templates were not available in MC++ (I might be wrong there though).
The wrapper uses a gcroot handle. My main intention of using a wrapper is to provide something for operator & which is private to gcroot. This would allow me to use containers like Boost Muti-Index which might require the address of the entitiy which is added to the collection.
After lot of struggle I realized that a STL is easy to use with the managed c++. What is needed is an unmanaged wrapper for your managed class which will hold the handle to the managed object. And functions for comparing/evaluating for the STL algorithms. I got so frustrated with the MC++ that I overlooked some of the commonly used workarounds.
STL for Managed C++
Dave M.
You can use gcroot for that.
std::list< gcroot<String*> >
Dmitry Medvedev
Dan-psg
With all the resources available to Microsoft and Dinkumware, STL.NET is yet not ready, so it's obviosuly a non-trivial task. It may be simpler to port your MC++ code to C++/CLI than to write a version of STL for VS 2003. I also believe that managed templates were not available in MC++ (I might be wrong there though).
engsrini
--P
billreynolds
After lot of struggle I realized that a STL is easy to use with the managed c++. What is needed is an unmanaged wrapper for your managed class which will hold the handle to the managed object. And functions for comparing/evaluating for the STL algorithms.
I got so frustrated with the MC++ that I overlooked some of the commonly used workarounds.
--P