Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
What if the various values that a variant may contain are pointers to data that has been allocated via new? Surely there is a problem if the value of the variant object is changed,
eg variant<T1*,T2*> vt;
vt = new T1;
vt = new T2;
Am I missing something - is there some way of treating this in variant. Or do you just have to avoid doing this kind of thing with variant?