🌓

MEM50-CPP. 不要访问被释放的内存

原文链接:

MEM50-CPP. Do not access freed memory

阅读全文

FIO50-CPP. 在没有获取文件定位调用前,不要从一个文件流交替地读写

原文链接:

FIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call

阅读全文

CTR58-CPP. 谓词函数对象不应该是 mutable

原文链接:

CTR58-CPP. Predicate function objects should not be mutable

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR58-CPP.+Predicate+function+objects+should+not+be+mutable

阅读全文

CTR57-CPP. 提供一个有效排序的谓词

原文链接:

CTR57-CPP. Provide a valid ordering predicate

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR57-CPP.+Provide+a+valid+ordering+predicate

阅读全文

CTR56-CPP. 不要在多态对象上使用指针运算

原文链接:

CTR56-CPP. Do not use pointer arithmetic on polymorphic objects

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR56-CPP.+Do+not+use+pointer+arithmetic+on+polymorphic+objects

阅读全文

CTR55-CPP. 不要使用对迭代器使用加法运算如果结果会溢出

原文链接:

CTR55-CPP. Do not use an additive operator on an iterator if the result would overflow

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR55-CPP.+Do+not+use+an+additive+operator+on+an+iterator+if+the+result+would+overflow

阅读全文

CTR54-CPP. 不要相减不是指向同一个容器的迭代器

原文链接:

CTR54-CPP. Do not subtract iterators that do not refer to the same container

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR54-CPP.+Do+not+subtract+iterators+that+do+not+refer+to+the+same+container

阅读全文

CTR53-CPP. 使用有效的迭代器范围

原文链接:

CTR53-CPP. Use valid iterator ranges

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR53-CPP.+Use+valid+iterator+ranges

阅读全文

CTR52-CPP. 确保库函数不要溢出

原文链接:

CTR52-CPP. Guarantee that library functions do not overflow

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR52-CPP.+Guarantee+that+library+functions+do+not+overflow

阅读全文

CTR51-CPP. 使用有效的引用,指针,迭代器来引用容器的元素

原文链接:

CTR51-CPP. Use valid references, pointers, and iterators to reference elements of a container

https://wiki.sei.cmu.edu/confluence/display/cplusplus/CTR51-CPP.+Use+valid+references%2C+pointers%2C+and+iterators+to+reference+elements+of+a+container

阅读全文