//----发生了自身调用自身的错误
struct ToleranceOverrideExc
{
ToleranceOverride rule_data;
set<SymbolTolerancePoint> symbol_points;
ToleranceOverrideExc(){memset(&rule_data, 0, sizeof(ToleranceOverride));}
ToleranceOverrideExc(const ToleranceOverride& tol_ovr){rule_data= tol_ovr;}
ToleranceOverrideExc(const ToleranceOverrideExc& other){*this= other;}
ToleranceOverrideExc& operator=(const ToleranceOverrideExc& other){*this= other;return *this;}
operator ToleranceOverride(){return rule_data;}
void SetValue(ToleranceOverride& save){rule_data= save;symbol_points.clear();}
};
备忘:
struct POD,的默认operator=可以保证其内部:子成员是POD会memcpy,子成员非POD会调用operator=