-
Book Overview & Buying
-
Table Of Contents
C++ Memory Management
By :
Before delving into some actual practices that require care, it’s interesting to look at the main categories of risks we could run into if our code does not respect the rules of the language. With each such category comes a form of unpleasantness we should strive to avoid.
Some constructs in C++ are said to be Ill-Formed, No Diagnostic Required (IFNDR). Indeed, you will find quite a few occurrences in the standard of “if […], the program is ill-formed, with no diagnostic required.” When something is IFNDR, it means your program is broken. Bad things could happen, but the compiler is not required to tell you about them (indeed, sometimes, the compiler does not have sufficient information to diagnose the problematic situation).
One Definition Rule (ODR) violations, to which we will return in the The ODR section later in this chapter, fall under IFNDR. However, there are other such cases, such...