On 24/04/2016 at 04:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
I have the following code:
class MyClass{
public:
MyClass() {
structure.clear();
}
void addLink(AutoAlloc<BaseLink> c){
structure.push_back(c);
}
private:
std::list<AutoAlloc<BaseLink>> structure;
};
It seems that I can't have a AutoAlloc<BaseLink> in std data structures (lists etc)
As an alternative, I use the following class and the container uses pointers of this class (std::list<MyLinkClass*>) :
class MyLinkClass {
private:
AutoAlloc<BaseLink> link;
unsigned int other_irrelevant_data;
public:
MyLinkClass(){}
};
Is there any better solution ?
I need to store BaseLink objects in a container.
Thank you.