A common example I use is implementing a “CString” [[Class]] in [[C++]]. It may not be evident to everyone what this implies, but what I mean by this is implementing a class that acts as a *owned* wrapper around a C-Style [[Null Terminated]] String, which also contains the length of said string.
> [Here is the full Example](https://github.com/bishan-batel/CString)
The CString implementation that I make will abide by the following requirements:
- CStrings should be able to be created from a `char*`, as well as be created as a [[Copy Constructor|copy of another CString]]
- All values of type CString own their own [[Heap]]-allocated string array
- Assigning one CString to another will [[Copy Assignment|copy the contents, leaving the original unchanged]]
- When a CString goes out of scope / is deleted, [[Destructor|it deletes the memory it owns.]]
- A CString can be compared [[Operator Overloading|using == with another CString]] in order to see if the *contents* of the strings are the same (as well as the inverse using `!=`).
- A CString can be *concatenated* with another CString using [[Operator Overloading|the + operator]], and the result is a new CString.
- All [[Move Semantics|move operators]] and [[Move Constructor|Move Constructors]] for CString should be implemented.