I need a function that's convert a std::vector to an CLI List
generic<typename T> where T:CliCommonObjectBase
List<T>^ Converter::ConvertDataBaseListToList(DBList<TMObject> list)
{
List<T>^ returnList = gcnew List<T>();
for (DBIterator<TMObject> iter = list.first(); !iter.done(); iter.next())
{
DBRef<TMObject> tempObject = *iter;
returnList->Add(gcnew T("BlaBla"));
}
return returnList;
}
the Constructor from CliCommonObjectBase
CliCommonObjectBase(String^ objectRefString);
the call
ConvertDataBaseListToList<CliMeeting^>(getReadBase()->getTermine());
CliMeeting inherit CliCommonObjectBase
My Problem is the gcnew T("BlaBla") gives an error