We have a C++ library which uses a struct containing an STL vector of structs, like so:
struct Params
{
// values...
}
struct Settings
{
std::vector<Params> m_params;
// values...
}
I'm writing a CLI wrapper for the library, and I want equivalents for the above struct types. I had been thinking about using a List as the equivalent of a vector, like so:
public value struct Params
{
// values...
}
public value struct Settings
{
List<Params>^ Params;
// values...
}
But since List<T> is a reference type, the list gets passed around by reference rather than value. Is there a way of creating a CLI class containing a list (or similar) which is passed by value, along with the rest of the members?