I didn't thought that this would be so hard, but I have the following program: In a multithreaded environment (using the ACE-Framework and OpenMP) I use the Observer pattern.
In the init-routine of the Observer-controller-thread (ActiveObject) I create a vector of ConcreteObservers (for notifying them with their discrete job) like this:
mResynthesisVec.assign(cMaxEDTDetection, ConcreteResynthesis(pClientObj));
Until now I have used only standard POD-Types in the class, so the standard copy-constructor didn't make any problems. But today I expanded the ConcreteObserver-class with a vector of the std::complex-type. I thought that the vector has already in-type copy-constructor capability, but all I get is a segmentation fault, right after creating the ConcreteObserver. So why doesn't that work?
Aucun commentaire:
Enregistrer un commentaire