jeudi 3 janvier 2019

C++ default = operator for struct not copying list

struct Mt{

//other element

list< string> xyz ;

};

class RandomClass{

Mt b ;

};

RandomClass::RandomClass(const Mt & x){

b= x; // this is not copying content of list in production environment, working fine in unit test

b.xyz = x.xyz; // this is working

}

Aucun commentaire:

Enregistrer un commentaire