Skip to main content

7 docs tagged with "best-practices"

View all tags

RAII (Resource Acquisition Is Initialization)

RAII is a fundamental C++ idiom where resource lifetime is tied to object lifetime. Resources are acquired in constructors and released in destructors, ensuring automatic cleanup and exception safety.

Rule of 0/3/5

These rules tell you which special member functions to define based on your class's resource management needs.

Test Integration

Test integration in CMake involves structuring your project to support different types of tests (unit, integration, system), managing test dependencies, and creating a smooth testing workflow. This goes beyond basic CTest usage to build a comprehensive testing strategy.