2 ms·
RAII is just as important as templates, and it does require you to use classes/structs.
by jeremyjh 8y ago
RAII is just as important as templates, and it does require you to use classes/structs.
- johannes1234321 8y agoTrue it requires classes as RAII is based on a destructor. However this doesn't require OOP design, which typically is associated with classes and objects.
- jeremyjh 8y agoYou don't have to use inheritance, but you will certainly use object composition and encapsulation to manage the lifetimes of your data in a coherent way.