[{"data":1,"prerenderedAt":2152},["ShallowReactive",2],{"global-navigation":3,"page-\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop58-cpp":28,"surround-\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop58-cpp":1447,"sidebar-sei-cert-cpp-coding-standard":1455},[4,8],{"title":5,"path":6,"_path":6,"fromAppConfig":7},"Home","\u002F",true,{"title":9,"path":10,"children":11,"_path":27,"fromAppConfig":7},"Coding Standards","\u002Fcoding-standards\u002F",[12,15,18,21,24],{"title":13,"path":14},"Android Coding Standard","\u002Fandroid-secure-coding-standard\u002F",{"title":16,"path":17},"C Coding Standard","\u002Fsei-cert-c-coding-standard\u002F",{"title":19,"path":20},"C++ Coding Standard","\u002Fsei-cert-cpp-coding-standard\u002F",{"title":22,"path":23},"Java Coding Standard","\u002Fsei-cert-oracle-coding-standard-for-java\u002F",{"title":25,"path":26},"Perl Coding Standard","\u002Fsei-cert-perl-coding-standard\u002F","\u002Fcoding-standards",{"id":29,"title":30,"body":31,"description":41,"extension":1433,"meta":1434,"navigation":7,"path":1443,"seo":1444,"stem":1445,"__hash__":1446},"content\u002F5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F10.oop58-cpp.md","OOP58-CPP. Copy operations must not mutate the source object",{"type":32,"value":33,"toc":1423},"minimark",[34,38,42,68,71,78,84,95,133,163,203,220,236,239,274,667,672,684,1032,1036,1051,1055,1058,1119,1123,1290,1294,1307,1311,1336,1340,1394,1397,1419],[35,36,30],"h1",{"id":37},"oop58-cpp-copy-operations-must-not-mutate-the-source-object",[39,40,41],"p",{},"Copy operations (copy constructors and copy assignment operators) are expected to copy the salient properties of a source object into the destination object, with the resulting object being a \"copy\" of the original. What is considered to be a salient property of the type is type-dependent, but for types that expose comparison or equality operators, includes any properties used for those comparison operations. This expectation leads to assumptions in code that a copy operation results in a destination object with a value representation that is equivalent to the source object value representation. Violation of this basic assumption can lead to unexpected behavior.",[39,43,44,45,49,50,53,54,57,58,61,62,67],{},"Ideally, the copy operator should have an idiomatic signature. For copy constructors, that is ",[46,47,48],"code",{},"  T(const T&); "," and for copy assignment operators, that is ",[46,51,52],{},"  T& operator=(const T&); "," . Copy constructors and copy assignment operators that do not use an idiomatic signature do not meet the requirements of the ",[46,55,56],{},"CopyConstructible"," or ",[46,59,60],{},"CopyAssignable"," concept, respectively. This precludes the type from being used with common standard library functionality [ ",[63,64,66],"a",{"href":65},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-ISO\u002FIEC14882-2014","ISO\u002FIEC 14882-2014"," ].",[39,69,70],{},"When implementing a copy operator, do not mutate any externally observable members of the source object operand or globally accessible information. Externally observable members include, but are not limited to, members that participate in comparison or equality operations, members whose values are exposed via public APIs, and global variables.",[39,72,73,74,77],{},"Before C++11, a copy operation that mutated the source operand was the only way to provide move-like semantics. However, the language did not provide a way to enforce that this operation only occurred when the source operand was at the end of its lifetime, which led to fragile APIs like ",[46,75,76],{},"std::auto_ptr"," . In C++11 and later, such a situation is a good candidate for a move operation instead of a copy operation.",[79,80,82],"h3",{"id":81},"auto_ptr",[46,83,81],{},[39,85,86,87,89,90,94],{},"For example, in C++03, ",[46,88,76],{}," had the following copy operation signatures [ ",[63,91,93],{"href":92},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-ISO\u002FIEC14882-2003","ISO\u002FIEC 14882-2003"," ] :",[96,97,98,109],"table",{},[99,100,101],"thead",{},[102,103,104,107],"tr",{},[105,106],"th",{},[105,108],{},[110,111,112,123],"tbody",{},[102,113,114,118],{},[115,116,117],"td",{},"Copy constructor",[115,119,120],{},[46,121,122],{},"     auto_ptr(auto_ptr &A);    ",[102,124,125,128],{},[115,126,127],{},"Copy assignment",[115,129,130],{},[46,131,132],{},"     auto_ptr& operator=(auto_ptr &A);    ",[39,134,135,136,139,140,143,144,147,148,152,153,155,156,162],{},"Both copy construction and copy assignment would mutate the source argument, ",[46,137,138],{},"A"," , by effectively calling ",[46,141,142],{},"this->reset(A.release())"," . However, this invalidated assumptions made by standard library algorithms such as ",[46,145,146],{},"std::sort()"," , which may need to make a copy of an object for later comparisons [ ",[63,149,151],{"href":150},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Faa-bibliography#AA.Bibliography-Hinnant05","Hinnant 05"," ] . Consider the following implementation of ",[46,154,146],{}," that implements the ",[63,157,161],{"href":158,"rel":159},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FQuicksort",[160],"nofollow","quick sort"," algorithm.",[164,165,170],"pre",{"className":166,"code":167,"language":168,"meta":169,"style":169},"language-java shiki shiki-themes github-light github-dark monokai","\u002F\u002F ...\nvalue_type pivot_element = *mid_point;\n\u002F\u002F ...\n","java","",[46,171,172,181,198],{"__ignoreMap":169},[173,174,177],"span",{"class":175,"line":176},"line",1,[173,178,180],{"class":179},"s8-w5","\u002F\u002F ...\n",[173,182,184,188,192,195],{"class":175,"line":183},2,[173,185,187],{"class":186},"sMOD_","value_type pivot_element ",[173,189,191],{"class":190},"sC2Qs","=",[173,193,194],{"class":190}," *",[173,196,197],{"class":186},"mid_point;\n",[173,199,201],{"class":175,"line":200},3,[173,202,180],{"class":179},[39,204,205,206,209,210,213,214,216,217,219],{},"At this point, the sorting algorithm assumes that ",[46,207,208],{},"pivot_element"," and ",[46,211,212],{},"*mid_point"," have equivalent value representations and will compare equal. However, for ",[46,215,76],{}," , this is not the case because ",[46,218,212],{}," has been mutated and results in unexpected behavior.",[39,221,222,223,226,227,229,230,232,233,235],{},"In C++11, the ",[46,224,225],{},"std::unique_ptr"," smart pointer class was introduced as a replacement for ",[46,228,76],{}," to better specify the ownership semantics of pointer objects. Rather than mutate the source argument in a copy operation, ",[46,231,225],{}," explicitly deletes the copy constructor and copy assignment operator, and instead uses a move constructor and move assignment operator. Subsequently, ",[46,234,76],{}," was deprecated in C++11.",[39,237,238],{},"Noncompliant Code Example",[39,240,241,242,244,245,248,249,252,253,256,257,260,261,264,265,267,268,270,271,273],{},"In this noncompliant code example, the copy operations for ",[46,243,138],{}," mutate the source operand by resetting its member variable ",[46,246,247],{},"m"," to ",[46,250,251],{},"0"," . When ",[46,254,255],{},"std::fill()"," is called, the first element copied will have the original value of ",[46,258,259],{},"obj.m"," , ",[46,262,263],{},"12"," , at which point ",[46,266,259],{}," is set to ",[46,269,251],{}," . The subsequent nine copies will all retain the value ",[46,272,251],{}," .",[275,276,278],"code-block",{"quality":277},"bad",[164,279,283],{"className":280,"code":281,"language":282,"meta":169,"style":169},"language-cpp shiki shiki-themes github-light github-dark monokai","#include \u003Calgorithm>\n#include \u003Cvector>\n\nclass A {\n  mutable int m;\n  \npublic:\n  A() : m(0) {}\n  explicit A(int m) : m(m) {}\n  \n  A(const A &other) : m(other.m) {\n    other.m = 0;\n  }\n  \n  A& operator=(const A &other) {\n    if (&other != this) {\n      m = other.m;\n      other.m = 0;\n    }\n    return *this;\n  }\n  \n  int get_m() const { return m; }\n};\n\nvoid f() {\n  std::vector\u003CA> v{10};\n  A obj(12);\n  std::fill(v.begin(), v.end(), obj);\n}\n","cpp",[46,284,285,294,301,306,320,332,338,344,365,390,395,420,434,440,445,472,495,506,518,524,537,542,548,571,577,582,594,619,635,661],{"__ignoreMap":169},[173,286,287,290],{"class":175,"line":176},[173,288,289],{"class":190},"#include",[173,291,293],{"class":292},"sstjo"," \u003Calgorithm>\n",[173,295,296,298],{"class":175,"line":183},[173,297,289],{"class":190},[173,299,300],{"class":292}," \u003Cvector>\n",[173,302,303],{"class":175,"line":200},[173,304,305],{"emptyLinePlaceholder":7},"\n",[173,307,309,313,317],{"class":175,"line":308},4,[173,310,312],{"class":311},"sq6CD","class",[173,314,316],{"class":315},"sz2Vg"," A",[173,318,319],{"class":186}," {\n",[173,321,323,326,329],{"class":175,"line":322},5,[173,324,325],{"class":190},"  mutable",[173,327,328],{"class":311}," int",[173,330,331],{"class":186}," m;\n",[173,333,335],{"class":175,"line":334},6,[173,336,337],{"class":186},"  \n",[173,339,341],{"class":175,"line":340},7,[173,342,343],{"class":311},"public:\n",[173,345,347,351,354,356,359,362],{"class":175,"line":346},8,[173,348,350],{"class":349},"srTi1","  A",[173,352,353],{"class":186},"() : ",[173,355,247],{"class":349},[173,357,358],{"class":186},"(",[173,360,251],{"class":361},"s7F3e",[173,363,364],{"class":186},") {}\n",[173,366,368,371,373,375,378,382,385,387],{"class":175,"line":367},9,[173,369,370],{"class":190},"  explicit",[173,372,316],{"class":349},[173,374,358],{"class":186},[173,376,377],{"class":311},"int",[173,379,381],{"class":380},"sTHNf"," m",[173,383,384],{"class":186},") : ",[173,386,247],{"class":349},[173,388,389],{"class":186},"(m) {}\n",[173,391,393],{"class":175,"line":392},10,[173,394,337],{"class":186},[173,396,398,400,402,405,407,410,413,415,417],{"class":175,"line":397},11,[173,399,350],{"class":349},[173,401,358],{"class":186},[173,403,404],{"class":190},"const",[173,406,316],{"class":315},[173,408,409],{"class":190}," &",[173,411,412],{"class":380},"other",[173,414,384],{"class":186},[173,416,247],{"class":349},[173,418,419],{"class":186},"(other.m) {\n",[173,421,423,426,428,431],{"class":175,"line":422},12,[173,424,425],{"class":186},"    other.m ",[173,427,191],{"class":190},[173,429,430],{"class":361}," 0",[173,432,433],{"class":186},";\n",[173,435,437],{"class":175,"line":436},13,[173,438,439],{"class":186},"  }\n",[173,441,443],{"class":175,"line":442},14,[173,444,337],{"class":186},[173,446,448,450,453,456,459,461,463,465,467,469],{"class":175,"line":447},15,[173,449,350],{"class":315},[173,451,452],{"class":190},"&",[173,454,455],{"class":190}," operator",[173,457,191],{"class":458},"s_OQ2",[173,460,358],{"class":186},[173,462,404],{"class":190},[173,464,316],{"class":315},[173,466,409],{"class":190},[173,468,412],{"class":380},[173,470,471],{"class":186},") {\n",[173,473,475,478,481,483,486,489,493],{"class":175,"line":474},16,[173,476,477],{"class":190},"    if",[173,479,480],{"class":186}," (",[173,482,452],{"class":190},[173,484,485],{"class":186},"other ",[173,487,488],{"class":190},"!=",[173,490,492],{"class":491},"sP7S_"," this",[173,494,471],{"class":186},[173,496,498,501,503],{"class":175,"line":497},17,[173,499,500],{"class":186},"      m ",[173,502,191],{"class":190},[173,504,505],{"class":186}," other.m;\n",[173,507,509,512,514,516],{"class":175,"line":508},18,[173,510,511],{"class":186},"      other.m ",[173,513,191],{"class":190},[173,515,430],{"class":361},[173,517,433],{"class":186},[173,519,521],{"class":175,"line":520},19,[173,522,523],{"class":186},"    }\n",[173,525,527,530,532,535],{"class":175,"line":526},20,[173,528,529],{"class":190},"    return",[173,531,194],{"class":190},[173,533,534],{"class":491},"this",[173,536,433],{"class":186},[173,538,540],{"class":175,"line":539},21,[173,541,439],{"class":186},[173,543,545],{"class":175,"line":544},22,[173,546,547],{"class":186},"  \n",[173,549,551,554,557,560,562,565,568],{"class":175,"line":550},23,[173,552,553],{"class":311},"  int",[173,555,556],{"class":349}," get_m",[173,558,559],{"class":186},"() ",[173,561,404],{"class":190},[173,563,564],{"class":186}," { ",[173,566,567],{"class":190},"return",[173,569,570],{"class":186}," m; }\n",[173,572,574],{"class":175,"line":573},24,[173,575,576],{"class":186},"};\n",[173,578,580],{"class":175,"line":579},25,[173,581,305],{"emptyLinePlaceholder":7},[173,583,585,588,591],{"class":175,"line":584},26,[173,586,587],{"class":311},"void",[173,589,590],{"class":349}," f",[173,592,593],{"class":186},"() {\n",[173,595,597,600,603,606,608,611,614,617],{"class":175,"line":596},27,[173,598,599],{"class":315},"  std",[173,601,602],{"class":186},"::vector",[173,604,605],{"class":190},"\u003C",[173,607,138],{"class":186},[173,609,610],{"class":190},">",[173,612,613],{"class":186}," v{",[173,615,616],{"class":361},"10",[173,618,576],{"class":186},[173,620,622,625,628,630,632],{"class":175,"line":621},28,[173,623,624],{"class":186},"  A ",[173,626,627],{"class":349},"obj",[173,629,358],{"class":186},[173,631,263],{"class":361},[173,633,634],{"class":186},");\n",[173,636,638,640,643,646,649,652,655,658],{"class":175,"line":637},29,[173,639,599],{"class":315},[173,641,642],{"class":186},"::",[173,644,645],{"class":349},"fill",[173,647,648],{"class":186},"(v.",[173,650,651],{"class":349},"begin",[173,653,654],{"class":186},"(), v.",[173,656,657],{"class":349},"end",[173,659,660],{"class":186},"(), obj);\n",[173,662,664],{"class":175,"line":663},30,[173,665,666],{"class":186},"}\n",[668,669,671],"h2",{"id":670},"compliant-solution","Compliant Solution",[39,673,674,675,677,678,680,681,683],{},"In this compliant solution, the copy operations for ",[46,676,138],{}," no longer mutate the source operand, ensuring that the vector contains equivalent copies of ",[46,679,627],{}," . Instead, ",[46,682,138],{}," has been given move operations that perform the mutation when it is safe to do so.",[275,685,687],{"quality":686},"good",[164,688,690],{"className":280,"code":689,"language":282,"meta":169,"style":169},"#include \u003Calgorithm>\n#include \u003Cvector>\n\nclass A {\n  int m;\n  \npublic:\n  A() : m(0) {}\n  explicit A(int m) : m(m) {}\n  \n  A(const A &other) : m(other.m) {}\n  A(A &&other) : m(other.m) { other.m = 0; }\n  \n  A& operator=(const A &other) {\n    if (&other != this) {\n      m = other.m;\n    }\n    return *this;\n  }\n \n  A& operator=(A &&other) {\n    m = other.m;\n    other.m = 0;\n    return *this;\n  }\n  \n  int get_m() const { return m; }\n};\n\nvoid f() {\n  std::vector\u003CA> v{10};\n  A obj(12);\n  std::fill(v.begin(), v.end(), obj);\n}\n",[46,691,692,698,704,708,716,722,726,730,744,762,766,787,814,818,840,856,864,868,878,882,887,907,916,926,936,940,944,960,964,968,976,995,1008,1027],{"__ignoreMap":169},[173,693,694,696],{"class":175,"line":176},[173,695,289],{"class":190},[173,697,293],{"class":292},[173,699,700,702],{"class":175,"line":183},[173,701,289],{"class":190},[173,703,300],{"class":292},[173,705,706],{"class":175,"line":200},[173,707,305],{"emptyLinePlaceholder":7},[173,709,710,712,714],{"class":175,"line":308},[173,711,312],{"class":311},[173,713,316],{"class":315},[173,715,319],{"class":186},[173,717,718,720],{"class":175,"line":322},[173,719,553],{"class":311},[173,721,331],{"class":186},[173,723,724],{"class":175,"line":334},[173,725,337],{"class":186},[173,727,728],{"class":175,"line":340},[173,729,343],{"class":311},[173,731,732,734,736,738,740,742],{"class":175,"line":346},[173,733,350],{"class":349},[173,735,353],{"class":186},[173,737,247],{"class":349},[173,739,358],{"class":186},[173,741,251],{"class":361},[173,743,364],{"class":186},[173,745,746,748,750,752,754,756,758,760],{"class":175,"line":367},[173,747,370],{"class":190},[173,749,316],{"class":349},[173,751,358],{"class":186},[173,753,377],{"class":311},[173,755,381],{"class":380},[173,757,384],{"class":186},[173,759,247],{"class":349},[173,761,389],{"class":186},[173,763,764],{"class":175,"line":392},[173,765,337],{"class":186},[173,767,768,770,772,774,776,778,780,782,784],{"class":175,"line":397},[173,769,350],{"class":349},[173,771,358],{"class":186},[173,773,404],{"class":190},[173,775,316],{"class":315},[173,777,409],{"class":190},[173,779,412],{"class":380},[173,781,384],{"class":186},[173,783,247],{"class":349},[173,785,786],{"class":186},"(other.m) {}\n",[173,788,789,791,793,795,798,800,802,804,807,809,811],{"class":175,"line":422},[173,790,350],{"class":349},[173,792,358],{"class":186},[173,794,138],{"class":315},[173,796,797],{"class":190}," &&",[173,799,412],{"class":380},[173,801,384],{"class":186},[173,803,247],{"class":349},[173,805,806],{"class":186},"(other.m) { other.m ",[173,808,191],{"class":190},[173,810,430],{"class":361},[173,812,813],{"class":186},"; }\n",[173,815,816],{"class":175,"line":436},[173,817,337],{"class":186},[173,819,820,822,824,826,828,830,832,834,836,838],{"class":175,"line":442},[173,821,350],{"class":315},[173,823,452],{"class":190},[173,825,455],{"class":190},[173,827,191],{"class":458},[173,829,358],{"class":186},[173,831,404],{"class":190},[173,833,316],{"class":315},[173,835,409],{"class":190},[173,837,412],{"class":380},[173,839,471],{"class":186},[173,841,842,844,846,848,850,852,854],{"class":175,"line":447},[173,843,477],{"class":190},[173,845,480],{"class":186},[173,847,452],{"class":190},[173,849,485],{"class":186},[173,851,488],{"class":190},[173,853,492],{"class":491},[173,855,471],{"class":186},[173,857,858,860,862],{"class":175,"line":474},[173,859,500],{"class":186},[173,861,191],{"class":190},[173,863,505],{"class":186},[173,865,866],{"class":175,"line":497},[173,867,523],{"class":186},[173,869,870,872,874,876],{"class":175,"line":508},[173,871,529],{"class":190},[173,873,194],{"class":190},[173,875,534],{"class":491},[173,877,433],{"class":186},[173,879,880],{"class":175,"line":520},[173,881,439],{"class":186},[173,883,884],{"class":175,"line":526},[173,885,886],{"class":186}," \n",[173,888,889,891,893,895,897,899,901,903,905],{"class":175,"line":539},[173,890,350],{"class":315},[173,892,452],{"class":190},[173,894,455],{"class":190},[173,896,191],{"class":458},[173,898,358],{"class":186},[173,900,138],{"class":315},[173,902,797],{"class":190},[173,904,412],{"class":380},[173,906,471],{"class":186},[173,908,909,912,914],{"class":175,"line":544},[173,910,911],{"class":186},"    m ",[173,913,191],{"class":190},[173,915,505],{"class":186},[173,917,918,920,922,924],{"class":175,"line":550},[173,919,425],{"class":186},[173,921,191],{"class":190},[173,923,430],{"class":361},[173,925,433],{"class":186},[173,927,928,930,932,934],{"class":175,"line":573},[173,929,529],{"class":190},[173,931,194],{"class":190},[173,933,534],{"class":491},[173,935,433],{"class":186},[173,937,938],{"class":175,"line":579},[173,939,439],{"class":186},[173,941,942],{"class":175,"line":584},[173,943,337],{"class":186},[173,945,946,948,950,952,954,956,958],{"class":175,"line":596},[173,947,553],{"class":311},[173,949,556],{"class":349},[173,951,559],{"class":186},[173,953,404],{"class":190},[173,955,564],{"class":186},[173,957,567],{"class":190},[173,959,570],{"class":186},[173,961,962],{"class":175,"line":621},[173,963,576],{"class":186},[173,965,966],{"class":175,"line":637},[173,967,305],{"emptyLinePlaceholder":7},[173,969,970,972,974],{"class":175,"line":663},[173,971,587],{"class":311},[173,973,590],{"class":349},[173,975,593],{"class":186},[173,977,979,981,983,985,987,989,991,993],{"class":175,"line":978},31,[173,980,599],{"class":315},[173,982,602],{"class":186},[173,984,605],{"class":190},[173,986,138],{"class":186},[173,988,610],{"class":190},[173,990,613],{"class":186},[173,992,616],{"class":361},[173,994,576],{"class":186},[173,996,998,1000,1002,1004,1006],{"class":175,"line":997},32,[173,999,624],{"class":186},[173,1001,627],{"class":349},[173,1003,358],{"class":186},[173,1005,263],{"class":361},[173,1007,634],{"class":186},[173,1009,1011,1013,1015,1017,1019,1021,1023,1025],{"class":175,"line":1010},33,[173,1012,599],{"class":315},[173,1014,642],{"class":186},[173,1016,645],{"class":349},[173,1018,648],{"class":186},[173,1020,651],{"class":349},[173,1022,654],{"class":186},[173,1024,657],{"class":349},[173,1026,660],{"class":186},[173,1028,1030],{"class":175,"line":1029},34,[173,1031,666],{"class":186},[668,1033,1035],{"id":1034},"exceptions","Exceptions",[39,1037,1038,1042,1043,1046,1047,1050],{},[1039,1040,1041],"strong",{},"OOP58-CPP-EX0:"," Reference counting, and implementations such as ",[46,1044,1045],{},"std::shared_ptr\u003C>"," constitute an exception to this rule. Any copy or assignment operation of a reference-counted object requires the reference count to be incremented. The semantics of reference counting are well-understood, and it can be argued that the reference count is not a salient part of the ",[46,1048,1049],{},"shared_pointer"," object.",[668,1052,1054],{"id":1053},"risk-assessment","Risk Assessment",[39,1056,1057],{},"Copy operations that mutate the source operand or global state can lead to unexpected program behavior. Using such a type in a Standard Template Library container or algorithm can also lead to undefined behavior.",[96,1059,1060,1061,1060,1088],{},"\n  ",[99,1062,1063,1064,1060],{},"\n    ",[102,1065,1066,1067,1066,1070,1066,1073,1066,1076,1066,1079,1066,1082,1066,1085,1063],{},"\n      ",[105,1068,1069],{},"Rule",[105,1071,1072],{},"Severity",[105,1074,1075],{},"Likelihood",[105,1077,1078],{},"Detectable",[105,1080,1081],{},"Repairable",[105,1083,1084],{},"Priority",[105,1086,1087],{},"Level",[110,1089,1063,1090,1060],{},[102,1091,1066,1092,1066,1095,1066,1098,1066,1101,1066,1104,1066,1107,1066,1114,1063],{},[115,1093,1094],{},"OOP58-CPP",[115,1096,1097],{},"Low",[115,1099,1100],{},"Likely",[115,1102,1103],{},"Yes",[115,1105,1106],{},"No",[115,1108,1110],{"style":1109},"color: #f1c40f;",[1111,1112,1113],"b",{},"P6",[115,1115,1116],{"style":1109},[1111,1117,1118],{},"L2",[668,1120,1122],{"id":1121},"automated-detection","Automated Detection",[96,1124,1127,1153],{"className":1125},[1126],"wrapped",[99,1128,1129],{},[102,1130,1133,1138,1143,1148],{"className":1131},[1132],"header",[105,1134,1135],{},[39,1136,1137],{},"Tool",[105,1139,1140],{},[39,1141,1142],{},"Version",[105,1144,1145],{},[39,1146,1147],{},"Checker",[105,1149,1150],{},[39,1151,1152],{},"Description",[110,1154,1155,1185,1213,1238,1264],{},[102,1156,1159,1165,1173,1180],{"className":1157},[1158],"odd",[115,1160,1161],{},[63,1162,1164],{"href":1163},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fcodesonar","CodeSonar",[115,1166,1167],{},[1168,1169,1172],"div",{"className":1170},[1171],"content-wrapper","9.1p0",[115,1174,1175],{},[39,1176,1177],{},[1039,1178,1179],{},"LANG.FUNCS.COPINC",[115,1181,1182],{},[39,1183,1184],{},"Copy Operation Parameter Is Not const",[102,1186,1189,1195,1203,1208],{"className":1187},[1188],"even",[115,1190,1191],{},[63,1192,1194],{"href":1193},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fhelix-qac","Helix QAC",[115,1196,1197],{},[1168,1198,1200],{"className":1199},[1171],[39,1201,1202],{},"2025.2",[115,1204,1205],{},[1039,1206,1207],{},"C++4075",[115,1209,1210],{},[1211,1212],"br",{},[102,1214,1216,1222,1227,1234],{"className":1215},[1158],[115,1217,1218],{},[63,1219,1221],{"href":1220},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fklocwork","Klocwork",[115,1223,1224],{},[1168,1225,1202],{"className":1226},[1171],[115,1228,1229],{},[39,1230,1231],{},[1039,1232,1233],{},"CERT.OOP.COPY_MUTATES",[115,1235,1236],{},[1211,1237],{},[102,1239,1241,1247,1254,1261],{"className":1240},[1188],[115,1242,1243],{},[63,1244,1246],{"href":1245},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fparasoft","Parasoft C\u002FC++test",[115,1248,1249],{},[1168,1250,1252],{"className":1251},[1171],[39,1253,1202],{},[115,1255,1256],{},[39,1257,1258],{},[1039,1259,1260],{},"CERT_CPP-OOP58-a",[115,1262,1263],{},"Copy operations must not mutate the source object",[102,1265,1267,1273,1281,1287],{"className":1266},[1158],[115,1268,1269],{},[63,1270,1272],{"href":1271},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fpolyspace-bug-finder","Polyspace Bug Finder",[115,1274,1275],{},[1168,1276,1278],{"className":1277},[1171],[39,1279,1280],{},"R2025b",[115,1282,1283],{},[63,1284,1286],{"href":1285},"https:\u002F\u002Fwww.mathworks.com\u002Fhelp\u002Fbugfinder\u002Fref\u002Fcertcoop58cpp.html","CERT C++: OOP58-CPP",[115,1288,1289],{},"Checks for copy operation modifying source operand (rule partially covered)",[668,1291,1293],{"id":1292},"related-vulnerabilities","Related Vulnerabilities",[39,1295,1296,1297,1301,1302,273],{},"Search for ",[63,1298,1300],{"href":1299},"\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fbb-definitions#BB.Definitions-vuln","vulnerabilities"," resulting from the violation of this rule on the ",[63,1303,1306],{"href":1304,"rel":1305},"https:\u002F\u002Fwww.kb.cert.org\u002Fvulnotes\u002Fbymetric?searchview&query=FIELD+KEYWORDS+contains+OOP58-CPP",[160],"CERT website",[668,1308,1310],{"id":1309},"related-guidelines","Related Guidelines",[96,1312,1313,1321],{},[99,1314,1315],{},[102,1316,1317,1319],{},[105,1318],{},[105,1320],{},[110,1322,1323],{},[102,1324,1325,1330],{},[115,1326,1327],{},[63,1328,1329],{"href":20},"SEI CERT C++ Coding Standard",[115,1331,1332],{},[63,1333,1335],{"href":1334},"\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop54-cpp","OOP54-CPP. Gracefully handle self-copy assignment",[668,1337,1339],{"id":1338},"bibliography","Bibliography",[96,1341,1343,1352],{"className":1342},[1126],[1344,1345,1346,1350],"colgroup",{},[1347,1348],"col",{"style":1349},"width: 50%",[1347,1351],{"style":1349},[110,1353,1354,1372,1383],{},[102,1355,1357,1363],{"className":1356},[1158],[115,1358,1359,1360,1362],{},"[ ",[63,1361,66],{"href":65}," ]",[115,1364,1365,1366,1368,1369,1371],{},"Subclause 12.8, \"Copying and Moving Class Objects\"",[1211,1367],{},"\nTable 21, \"CopyConstructible Requirements\"",[1211,1370],{},"\nTable 23, \"CopyAssignable Requirements\"",[102,1373,1375,1379],{"className":1374},[1188],[115,1376,1359,1377,1362],{},[63,1378,93],{"href":92},[115,1380,1381],{},[1211,1382],{},[102,1384,1386,1391],{"className":1385},[1158],[115,1387,1359,1388,1362],{},[63,1389,1390],{"href":150},"Hinnant 2005",[115,1392,1393],{},"\"Rvalue Reference Recommendations for Chapter 20\"",[1395,1396],"hr",{},[39,1398,1399,1406,1407,1406,1413],{},[63,1400,1402],{"href":1401},"\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop57-cpp",[1403,1404],"img",{"src":1405},"\u002Fattachments\u002F88046682\u002F88480621.png"," ",[63,1408,1410],{"href":1409},"\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002F",[1403,1411],{"src":1412},"\u002Fattachments\u002F88046682\u002F88475556.png",[63,1414,1416],{"href":1415},"\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002F",[1403,1417],{"src":1418},"\u002Fattachments\u002F88046682\u002F88475555.png",[1420,1421,1422],"style",{},"html pre.shiki code .s8-w5, html code.shiki .s8-w5{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F}html pre.shiki code .sMOD_, html code.shiki .sMOD_{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sC2Qs, html code.shiki .sC2Qs{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .sstjo, html code.shiki .sstjo{--shiki-default:#032F62;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sq6CD, html code.shiki .sq6CD{--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .sz2Vg, html code.shiki .sz2Vg{--shiki-default:#6F42C1;--shiki-default-text-decoration:inherit;--shiki-dark:#B392F0;--shiki-dark-text-decoration:inherit;--shiki-sepia:#A6E22E;--shiki-sepia-text-decoration:underline}html pre.shiki code .srTi1, html code.shiki .srTi1{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .s7F3e, html code.shiki .s7F3e{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sTHNf, html code.shiki .sTHNf{--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit;--shiki-sepia:#FD971F;--shiki-sepia-font-style:italic}html pre.shiki code .s_OQ2, html code.shiki .s_OQ2{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#F8F8F2}html pre.shiki code .sP7S_, html code.shiki .sP7S_{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#FD971F}",{"title":169,"searchDepth":183,"depth":183,"links":1424},[1425,1426,1427,1428,1429,1430,1431,1432],{"id":81,"depth":200,"text":81},{"id":670,"depth":183,"text":671},{"id":1034,"depth":183,"text":1035},{"id":1053,"depth":183,"text":1054},{"id":1121,"depth":183,"text":1122},{"id":1292,"depth":183,"text":1293},{"id":1309,"depth":183,"text":1310},{"id":1338,"depth":183,"text":1339},"md",{"tags":1435},[1436,1437,1438,1439,1440,1441,1442],"review","oop","ptc","review-dms","rule","review-ajb","no-autodetect","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop58-cpp",{"title":30,"description":41},"5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F10.oop58-cpp","Q5bt-HG9vSQm2YIjuh4hGnQ8dyhZQ-bMfNR2EEH-0rU",[1448,1451],{"title":1449,"path":1401,"stem":1450,"children":-1},"OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F09.oop57-cpp",{"title":1452,"path":1453,"stem":1454,"children":-1},"Back Matter","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F1.index",[1456],{"title":1329,"path":1457,"stem":1458,"children":1459},"\u002Fsei-cert-cpp-coding-standard","5.sei-cert-cpp-coding-standard\u002F1.index",[1460,1461,1528,1924,2138,2148],{"title":1329,"path":1457,"stem":1458},{"title":1462,"path":1463,"stem":1464,"children":1465},"Front Matter","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F1.index",[1466,1467],{"title":1462,"path":1463,"stem":1464},{"title":1468,"path":1469,"stem":1470,"children":1471},"Introduction","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F01.index",[1472,1473,1477,1481,1485,1489,1493,1497,1501,1505,1509,1513,1517,1521,1525],{"title":1468,"path":1469,"stem":1470},{"title":1474,"path":1475,"stem":1476},"Scope","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fscope","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F02.scope",{"title":1478,"path":1479,"stem":1480},"Audience","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Faudience","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F03.audience",{"title":1482,"path":1483,"stem":1484},"Usage","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fusage","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F04.usage",{"title":1486,"path":1487,"stem":1488},"How this Coding Standard Is Organized","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fhow-this-coding-standard-is-organized","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F05.how-this-coding-standard-is-organized",{"title":1490,"path":1491,"stem":1492},"Relation to the CERT C Coding Standard","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Frelation-to-the-cert-c-coding-standard","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F06.relation-to-the-cert-c-coding-standard",{"title":1494,"path":1495,"stem":1496},"Rules Versus Recommendations","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Frules-versus-recommendations","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F07.rules-versus-recommendations",{"title":1498,"path":1499,"stem":1500},"Tool Selection and Validation","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Ftool-selection-and-validation","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F08.tool-selection-and-validation",{"title":1502,"path":1503,"stem":1504},"Conformance Testing","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fconformance-testing","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F09.conformance-testing",{"title":1506,"path":1507,"stem":1508},"Development Process","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fdevelopment-process","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F10.development-process",{"title":1510,"path":1511,"stem":1512},"System Qualities","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fsystem-qualities","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F11.system-qualities",{"title":1514,"path":1515,"stem":1516},"Automatically Generated Code","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fautomatically-generated-code","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F12.automatically-generated-code",{"title":1518,"path":1519,"stem":1520},"Government Regulations","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fgovernment-regulations","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F13.government-regulations",{"title":1522,"path":1523,"stem":1524},"Acknowledgments","\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Facknowledgments","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F14.acknowledgments",{"title":1122,"path":1526,"stem":1527},"\u002Fsei-cert-cpp-coding-standard\u002Ffront-matter\u002Fintroduction\u002Fautomated-detection","5.sei-cert-cpp-coding-standard\u002F2.front-matter\u002F2.introduction\u002F15.automated-detection",{"title":1529,"path":1530,"stem":1531,"children":1532},"Rules","\u002Fsei-cert-cpp-coding-standard\u002Frules","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F01.index",[1533,1534,1556,1590,1632,1682,1740,1802,1816,1826,1864,1890],{"title":1529,"path":1530,"stem":1531},{"title":1535,"path":1536,"stem":1537,"children":1538},"Characters and Strings (STR)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcharacters-and-strings-str","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F02.characters-and-strings-str\u002F1.index",[1539,1540,1544,1548,1552],{"title":1535,"path":1536,"stem":1537},{"title":1541,"path":1542,"stem":1543},"STR50-CPP. Guarantee that storage for strings has sufficient space for character data and the null terminator","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F02.characters-and-strings-str\u002F2.str50-cpp",{"title":1545,"path":1546,"stem":1547},"STR52-CPP. Use valid references, pointers, and iterators to reference elements of a basic_string","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F02.characters-and-strings-str\u002F3.str52-cpp",{"title":1549,"path":1550,"stem":1551},"STR53-CPP. Range check element access","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstr53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F02.characters-and-strings-str\u002F4.str53-cpp",{"title":1553,"path":1554,"stem":1555},"string from a null pointer","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcharacters-and-strings-str\u002Fstring-from-a-null-pointer","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F02.characters-and-strings-str\u002F5.string-from-a-null-pointer",{"title":1557,"path":1558,"stem":1559,"children":1560},"Concurrency (CON)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F1.index",[1561,1562,1566,1570,1574,1578,1582,1586],{"title":1557,"path":1558,"stem":1559},{"title":1563,"path":1564,"stem":1565},"CON50-CPP. Do not destroy a mutex while it is locked","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F2.con50-cpp",{"title":1567,"path":1568,"stem":1569},"CON51-CPP. Ensure actively held locks are released on exceptional conditions","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F3.con51-cpp",{"title":1571,"path":1572,"stem":1573},"CON52-CPP. Prevent data races when accessing bit-fields from multiple threads","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F4.con52-cpp",{"title":1575,"path":1576,"stem":1577},"CON53-CPP. Avoid deadlock by locking in a predefined order","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F5.con53-cpp",{"title":1579,"path":1580,"stem":1581},"CON54-CPP. Wrap functions that can spuriously wake up in a loop","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F6.con54-cpp",{"title":1583,"path":1584,"stem":1585},"CON55-CPP. Preserve thread safety and liveness when using condition variables","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F7.con55-cpp",{"title":1587,"path":1588,"stem":1589},"CON56-CPP. Do not speculatively lock a non-recursive mutex that is already owned by the calling thread","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F03.concurrency-con\u002F8.con56-cpp",{"title":1591,"path":1592,"stem":1593,"children":1594},"Containers (CTR)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F01.index",[1595,1596,1600,1604,1608,1612,1616,1620,1624,1628],{"title":1591,"path":1592,"stem":1593},{"title":1597,"path":1598,"stem":1599},"CTR50-CPP. Guarantee that container indices and iterators are within the valid range","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F02.ctr50-cpp",{"title":1601,"path":1602,"stem":1603},"CTR51-CPP. Use valid references, pointers, and iterators to reference elements of a container","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F03.ctr51-cpp",{"title":1605,"path":1606,"stem":1607},"CTR52-CPP. Guarantee that library functions do not overflow","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F04.ctr52-cpp",{"title":1609,"path":1610,"stem":1611},"CTR53-CPP. Use valid iterator ranges","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F05.ctr53-cpp",{"title":1613,"path":1614,"stem":1615},"CTR54-CPP. Do not subtract iterators that do not refer to the same container","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F06.ctr54-cpp",{"title":1617,"path":1618,"stem":1619},"CTR55-CPP. Do not use an additive operator on an iterator if the result would overflow","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F07.ctr55-cpp",{"title":1621,"path":1622,"stem":1623},"CTR56-CPP. Do not use pointer arithmetic on polymorphic objects","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F08.ctr56-cpp",{"title":1625,"path":1626,"stem":1627},"CTR57-CPP. Provide a valid ordering predicate","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr57-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F09.ctr57-cpp",{"title":1629,"path":1630,"stem":1631},"CTR58-CPP. Predicate function objects should not be mutable","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fcontainers-ctr\u002Fctr58-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F04.containers-ctr\u002F10.ctr58-cpp",{"title":1633,"path":1634,"stem":1635,"children":1636},"Declarations and Initialization (DCL)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F01.index",[1637,1638,1642,1646,1650,1654,1658,1662,1666,1670,1674,1678],{"title":1633,"path":1634,"stem":1635},{"title":1639,"path":1640,"stem":1641},"DCL50-CPP. Do not define a C-style variadic function","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F02.dcl50-cpp",{"title":1643,"path":1644,"stem":1645},"DCL51-CPP. Do not declare or define a reserved identifier","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F03.dcl51-cpp",{"title":1647,"path":1648,"stem":1649},"DCL52-CPP. Never qualify a reference type with const or volatile","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F04.dcl52-cpp",{"title":1651,"path":1652,"stem":1653},"DCL53-CPP. Do not write syntactically ambiguous declarations","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F05.dcl53-cpp",{"title":1655,"path":1656,"stem":1657},"DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F06.dcl54-cpp",{"title":1659,"path":1660,"stem":1661},"DCL55-CPP. Avoid information leakage when passing a class object across a trust boundary","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F07.dcl55-cpp",{"title":1663,"path":1664,"stem":1665},"DCL56-CPP. Avoid cycles during initialization of static objects","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F08.dcl56-cpp",{"title":1667,"path":1668,"stem":1669},"DCL57-CPP. Do not let exceptions escape from destructors or deallocation functions","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl57-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F09.dcl57-cpp",{"title":1671,"path":1672,"stem":1673},"DCL58-CPP. Do not modify the standard namespaces","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl58-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F10.dcl58-cpp",{"title":1675,"path":1676,"stem":1677},"DCL59-CPP. Do not define an unnamed namespace in a header file","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl59-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F11.dcl59-cpp",{"title":1679,"path":1680,"stem":1681},"DCL60-CPP. Obey the one-definition rule","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl60-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F05.declarations-and-initialization-dcl\u002F12.dcl60-cpp",{"title":1683,"path":1684,"stem":1685,"children":1686},"Exceptions and Error Handling (ERR)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F01.index",[1687,1688,1692,1696,1700,1704,1708,1712,1716,1720,1724,1728,1732,1736],{"title":1683,"path":1684,"stem":1685},{"title":1689,"path":1690,"stem":1691},"ERR50-CPP. Do not abruptly terminate the program","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F02.err50-cpp",{"title":1693,"path":1694,"stem":1695},"ERR51-CPP. Handle all exceptions","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F03.err51-cpp",{"title":1697,"path":1698,"stem":1699},"ERR52-CPP. Do not use setjmp() or longjmp()","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F04.err52-cpp",{"title":1701,"path":1702,"stem":1703},"ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F05.err53-cpp",{"title":1705,"path":1706,"stem":1707},"ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F06.err54-cpp",{"title":1709,"path":1710,"stem":1711},"ERR55-CPP. Honor exception specifications","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F07.err55-cpp",{"title":1713,"path":1714,"stem":1715},"ERR56-CPP. Guarantee exception safety","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F08.err56-cpp",{"title":1717,"path":1718,"stem":1719},"ERR57-CPP. Do not leak resources when handling exceptions","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr57-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F09.err57-cpp",{"title":1721,"path":1722,"stem":1723},"ERR58-CPP. Handle all exceptions thrown before main() begins executing","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr58-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F10.err58-cpp",{"title":1725,"path":1726,"stem":1727},"ERR59-CPP. Do not throw an exception across execution boundaries","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr59-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F11.err59-cpp",{"title":1729,"path":1730,"stem":1731},"ERR60-CPP. Exception objects must be nothrow copy constructible","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr60-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F12.err60-cpp",{"title":1733,"path":1734,"stem":1735},"ERR61-CPP. Catch exceptions by lvalue reference","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr61-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F13.err61-cpp",{"title":1737,"path":1738,"stem":1739},"ERR62-CPP. Detect errors when converting a string to a number","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexceptions-and-error-handling-err\u002Ferr62-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F06.exceptions-and-error-handling-err\u002F14.err62-cpp",{"title":1741,"path":1742,"stem":1743,"children":1744},"Expressions (EXP)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F01.index",[1745,1746,1750,1754,1758,1762,1766,1770,1774,1778,1782,1786,1790,1794,1798],{"title":1741,"path":1742,"stem":1743},{"title":1747,"path":1748,"stem":1749},"EXP50-CPP. Do not depend on the order of evaluation for side effects","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F02.exp50-cpp",{"title":1751,"path":1752,"stem":1753},"EXP51-CPP. Do not delete an array through a pointer of the incorrect type","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F03.exp51-cpp",{"title":1755,"path":1756,"stem":1757},"EXP52-CPP. Do not rely on side effects in unevaluated operands","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F04.exp52-cpp",{"title":1759,"path":1760,"stem":1761},"EXP53-CPP. Do not read uninitialized memory","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F05.exp53-cpp",{"title":1763,"path":1764,"stem":1765},"EXP54-CPP. Do not access an object outside of its lifetime","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F06.exp54-cpp",{"title":1767,"path":1768,"stem":1769},"EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F07.exp55-cpp",{"title":1771,"path":1772,"stem":1773},"EXP56-CPP. Do not call a function with a mismatched language linkage","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F08.exp56-cpp",{"title":1775,"path":1776,"stem":1777},"EXP57-CPP. Do not cast or delete pointers to incomplete classes","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp57-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F09.exp57-cpp",{"title":1779,"path":1780,"stem":1781},"EXP58-CPP. Pass an object of the correct type to va_start","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp58-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F10.exp58-cpp",{"title":1783,"path":1784,"stem":1785},"EXP59-CPP. Use offsetof() on valid types and members","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp59-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F11.exp59-cpp",{"title":1787,"path":1788,"stem":1789},"EXP60-CPP. Do not pass a nonstandard-layout type object across execution boundaries","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp60-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F12.exp60-cpp",{"title":1791,"path":1792,"stem":1793},"EXP61-CPP. A lambda object must not outlive any of its reference captured objects","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp61-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F13.exp61-cpp",{"title":1795,"path":1796,"stem":1797},"EXP62-CPP. Do not access the bits of an object representation that are not part of the object's value representation","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp62-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F14.exp62-cpp",{"title":1799,"path":1800,"stem":1801},"EXP63-CPP. Do not rely on the value of a moved-from object","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fexpressions-exp\u002Fexp63-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F07.expressions-exp\u002F15.exp63-cpp",{"title":1803,"path":1804,"stem":1805,"children":1806},"Input Output (FIO)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Finput-output-fio","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F08.input-output-fio\u002F1.index",[1807,1808,1812],{"title":1803,"path":1804,"stem":1805},{"title":1809,"path":1810,"stem":1811},"FIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F08.input-output-fio\u002F2.fio50-cpp",{"title":1813,"path":1814,"stem":1815},"FIO51-CPP. Close files when they are no longer needed","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Finput-output-fio\u002Ffio51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F08.input-output-fio\u002F3.fio51-cpp",{"title":1817,"path":1818,"stem":1819,"children":1820},"Integers (INT)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fintegers-int","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F09.integers-int\u002F1.index",[1821,1822],{"title":1817,"path":1818,"stem":1819},{"title":1823,"path":1824,"stem":1825},"INT50-CPP. Do not cast to an out-of-range enumeration value","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fintegers-int\u002Fint50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F09.integers-int\u002F2.int50-cpp",{"title":1827,"path":1828,"stem":1829,"children":1830},"Memory Management (MEM)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F1.index",[1831,1832,1836,1840,1844,1848,1852,1856,1860],{"title":1827,"path":1828,"stem":1829},{"title":1833,"path":1834,"stem":1835},"MEM50-CPP. Do not access freed memory","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F2.mem50-cpp",{"title":1837,"path":1838,"stem":1839},"MEM51-CPP. Properly deallocate dynamically allocated resources","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F3.mem51-cpp",{"title":1841,"path":1842,"stem":1843},"MEM52-CPP. Detect and handle memory allocation errors","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F4.mem52-cpp",{"title":1845,"path":1846,"stem":1847},"MEM53-CPP. Explicitly construct and destruct objects when manually managing object lifetime","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F5.mem53-cpp",{"title":1849,"path":1850,"stem":1851},"MEM54-CPP. Provide placement new with properly aligned pointers to sufficient storage capacity","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F6.mem54-cpp",{"title":1853,"path":1854,"stem":1855},"MEM55-CPP. Honor replacement dynamic storage management requirements","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F7.mem55-cpp",{"title":1857,"path":1858,"stem":1859},"MEM56-CPP. Do not store an already-owned pointer value in an unrelated smart pointer","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F8.mem56-cpp",{"title":1861,"path":1862,"stem":1863},"MEM57-CPP. Avoid using default operator new for over-aligned types","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmemory-management-mem\u002Fmem57-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F10.memory-management-mem\u002F9.mem57-cpp",{"title":1865,"path":1866,"stem":1867,"children":1868},"Miscellaneous (MSC)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmiscellaneous-msc","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F11.miscellaneous-msc\u002F1.index",[1869,1870,1874,1878,1882,1886],{"title":1865,"path":1866,"stem":1867},{"title":1871,"path":1872,"stem":1873},"MSC51-CPP. Ensure your random number generator is properly seeded","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F11.miscellaneous-msc\u002F2.msc51-cpp",{"title":1875,"path":1876,"stem":1877},"MSC52-CPP. Value-returning functions must return a value from all exit paths","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F11.miscellaneous-msc\u002F3.msc52-cpp",{"title":1879,"path":1880,"stem":1881},"MSC53-CPP. Do not return from a function declared [[noreturn]]","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F11.miscellaneous-msc\u002F4.msc53-cpp",{"title":1883,"path":1884,"stem":1885},"MSC54-CPP. A signal handler must be a plain old function","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Fmsc54-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F11.miscellaneous-msc\u002F5.msc54-cpp",{"title":1887,"path":1888,"stem":1889},"rand() for generating pseudorandom numbers","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fmiscellaneous-msc\u002Frand-for-generating-pseudorandom-numbers","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F11.miscellaneous-msc\u002F6.rand-for-generating-pseudorandom-numbers",{"title":1891,"path":1892,"stem":1893,"children":1894},"Object Oriented Programming (OOP)","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F01.index",[1895,1896,1900,1904,1908,1912,1914,1918,1922,1923],{"title":1891,"path":1892,"stem":1893},{"title":1897,"path":1898,"stem":1899},"OOP50-CPP. Do not invoke virtual functions from constructors or destructors","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop50-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F02.oop50-cpp",{"title":1901,"path":1902,"stem":1903},"OOP51-CPP. Do not slice derived objects","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop51-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F03.oop51-cpp",{"title":1905,"path":1906,"stem":1907},"OOP52-CPP. Do not delete a polymorphic object without a virtual destructor","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop52-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F04.oop52-cpp",{"title":1909,"path":1910,"stem":1911},"OOP53-CPP. Write constructor member initializers in the canonical order","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop53-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F05.oop53-cpp",{"title":1335,"path":1334,"stem":1913},"5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F06.oop54-cpp",{"title":1915,"path":1916,"stem":1917},"OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop55-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F07.oop55-cpp",{"title":1919,"path":1920,"stem":1921},"OOP56-CPP. Honor replacement handler requirements","\u002Fsei-cert-cpp-coding-standard\u002Frules\u002Fobject-oriented-programming-oop\u002Foop56-cpp","5.sei-cert-cpp-coding-standard\u002F3.rules\u002F12.object-oriented-programming-oop\u002F08.oop56-cpp",{"title":1449,"path":1401,"stem":1450},{"title":30,"path":1443,"stem":1445},{"title":1452,"path":1453,"stem":1454,"children":1925},[1926,1927,1931,1935,2120,2134],{"title":1452,"path":1453,"stem":1454},{"title":1928,"path":1929,"stem":1930},"AA. Bibliography","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Faa-bibliography","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F2.aa-bibliography",{"title":1932,"path":1933,"stem":1934},"BB. Definitions","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fbb-definitions","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F3.bb-definitions",{"title":1936,"path":1937,"stem":1938,"children":1939},"CC. Analyzers","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F01.index",[1940,1941,1945,1949,1953,1957,1961,1965,1969,1973,1977,1981,1985,1987,1991,1995,1999,2003,2007,2011,2015,2019,2023,2025,2029,2031,2035,2039,2043,2046,2050,2052,2056,2060,2064,2068,2072,2076,2080,2084,2088,2092,2096,2100,2104,2108,2112,2116],{"title":1936,"path":1937,"stem":1938},{"title":1942,"path":1943,"stem":1944},"Astrée","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fastree","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F02.astree",{"title":1946,"path":1947,"stem":1948},"Astrée_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fastree_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F03.astree_v",{"title":1950,"path":1951,"stem":1952},"Axivion Bauhaus Suite","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Faxivion-bauhaus-suite","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F04.axivion-bauhaus-suite",{"title":1954,"path":1955,"stem":1956},"Axivion Bauhaus Suite_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Faxivion-bauhaus-suite_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F05.axivion-bauhaus-suite_v",{"title":1958,"path":1959,"stem":1960},"Clang","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fclang","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F06.clang",{"title":1962,"path":1963,"stem":1964},"Clang_38_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fclang_38_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F07.clang_38_v",{"title":1966,"path":1967,"stem":1968},"Clang_39_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fclang_39_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F08.clang_39_v",{"title":1970,"path":1971,"stem":1972},"Clang_40_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fclang_40_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F09.clang_40_v",{"title":1974,"path":1975,"stem":1976},"Clang_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fclang_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F10.clang_v",{"title":1978,"path":1979,"stem":1980},"Codee","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fcodee","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F11.codee",{"title":1982,"path":1983,"stem":1984},"Codee_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fcodee_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F12.codee_v",{"title":1164,"path":1163,"stem":1986},"5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F13.codesonar",{"title":1988,"path":1989,"stem":1990},"CodeSonar_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fcodesonar_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F14.codesonar_v",{"title":1992,"path":1993,"stem":1994},"Coverity","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fcoverity","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F15.coverity",{"title":1996,"path":1997,"stem":1998},"Coverity_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fcoverity_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F16.coverity_v",{"title":2000,"path":2001,"stem":2002},"ECLAIR","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Feclair","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F17.eclair",{"title":2004,"path":2005,"stem":2006},"ECLAIR_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Feclair_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F18.eclair_v",{"title":2008,"path":2009,"stem":2010},"EDG","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fedg","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F19.edg",{"title":2012,"path":2013,"stem":2014},"Edg_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fedg_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F20.edg_v",{"title":2016,"path":2017,"stem":2018},"GCC","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fgcc","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F21.gcc",{"title":2020,"path":2021,"stem":2022},"Gcc_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fgcc_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F22.gcc_v",{"title":1194,"path":1193,"stem":2024},"5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F23.helix-qac",{"title":2026,"path":2027,"stem":2028},"Helix QAC_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fhelix-qac_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F24.helix-qac_v",{"title":1221,"path":1220,"stem":2030},"5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F25.klocwork",{"title":2032,"path":2033,"stem":2034},"Klocwork_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fklocwork_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F26.klocwork_v",{"title":2036,"path":2037,"stem":2038},"LDRA","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fldra","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F27.ldra",{"title":2040,"path":2041,"stem":2042},"Ldra_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fldra_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F28.ldra_v",{"title":2044,"path":1245,"stem":2045},"Parasoft","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F29.parasoft",{"title":2047,"path":2048,"stem":2049},"Parasoft_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fparasoft_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F30.parasoft_v",{"title":1272,"path":1271,"stem":2051},"5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F31.polyspace-bug-finder",{"title":2053,"path":2054,"stem":2055},"Polyspace Bug Finder_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fpolyspace-bug-finder_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F32.polyspace-bug-finder_v",{"title":2057,"path":2058,"stem":2059},"PRQA QA-C++","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fprqa-qa-cpp","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F33.prqa-qa-cpp",{"title":2061,"path":2062,"stem":2063},"PRQA QA-C++_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fprqa-qa-cpp_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F34.prqa-qa-cpp_v",{"title":2065,"path":2066,"stem":2067},"PVS-Studio","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fpvs-studio","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F35.pvs-studio",{"title":2069,"path":2070,"stem":2071},"PVS-Studio_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fpvs-studio_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F36.pvs-studio_v",{"title":2073,"path":2074,"stem":2075},"Rose","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Frose","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F37.rose",{"title":2077,"path":2078,"stem":2079},"Rose_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Frose_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F38.rose_v",{"title":2081,"path":2082,"stem":2083},"RuleChecker","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Frulechecker","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F39.rulechecker",{"title":2085,"path":2086,"stem":2087},"RuleChecker_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Frulechecker_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F40.rulechecker_v",{"title":2089,"path":2090,"stem":2091},"Security Reviewer - Static Reviewer","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsecurity-reviewer-static-reviewer","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F41.security-reviewer-static-reviewer",{"title":2093,"path":2094,"stem":2095},"Security Reviewer - Static Reviewer_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsecurity-reviewer-static-reviewer_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F42.security-reviewer-static-reviewer_v",{"title":2097,"path":2098,"stem":2099},"Semgrep","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsemgrep","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F43.semgrep",{"title":2101,"path":2102,"stem":2103},"Semgrep_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsemgrep_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F44.semgrep_v",{"title":2105,"path":2106,"stem":2107},"SonarQube C\u002FC++ Plugin","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsonarqube-ccpp-plugin","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F45.sonarqube-ccpp-plugin",{"title":2109,"path":2110,"stem":2111},"SonarQube C\u002FC++ Plugin_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsonarqube-ccpp-plugin_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F46.sonarqube-ccpp-plugin_v",{"title":2113,"path":2114,"stem":2115},"Splint","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsplint","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F47.splint",{"title":2117,"path":2118,"stem":2119},"Splint_V","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fcc-analyzers\u002Fsplint_v","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F4.cc-analyzers\u002F48.splint_v",{"title":2121,"path":2122,"stem":2123,"children":2124},"DD. Related Guidelines","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fdd-related-guidelines","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F5.dd-related-guidelines\u002F1.index",[2125,2126,2130],{"title":2121,"path":2122,"stem":2123},{"title":2127,"path":2128,"stem":2129},"2008","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fdd-related-guidelines\u002F2.2008","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F5.dd-related-guidelines\u002F2.2008",{"title":2131,"path":2132,"stem":2133},"MITRE CWE","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fdd-related-guidelines\u002Fmitre-cwe","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F5.dd-related-guidelines\u002F3.mitre-cwe",{"title":2135,"path":2136,"stem":2137},"EE. Risk Assessments","\u002Fsei-cert-cpp-coding-standard\u002Fback-matter\u002Fee-risk-assessments","5.sei-cert-cpp-coding-standard\u002F4.back-matter\u002F6.ee-risk-assessments",{"title":2139,"path":2140,"stem":2141,"children":2142},"Admin","\u002Fsei-cert-cpp-coding-standard\u002Fadmin","5.sei-cert-cpp-coding-standard\u002F5.admin\u002F1.index",[2143,2144],{"title":2139,"path":2140,"stem":2141},{"title":2145,"path":2146,"stem":2147},"TODO List","\u002Fsei-cert-cpp-coding-standard\u002Fadmin\u002Ftodo-list","5.sei-cert-cpp-coding-standard\u002F5.admin\u002F2.todo-list",{"title":2149,"path":2150,"stem":2151},"Errata for SEI CERT C++ Coding Standard (2016 Edition)","\u002Fsei-cert-cpp-coding-standard\u002Ferrata-for-sei-cert-cpp-coding-standard-2016-edition","5.sei-cert-cpp-coding-standard\u002F6.errata-for-sei-cert-cpp-coding-standard-2016-edition",1775657778724]