Initially, the preprocessor conducts source code preprocessing, handling directives and creating a temporary file. Subsequently, the compiler undertakes the translation of the preprocessed code into object […]
Double checked locking pattern was used in sigleton initialization in multi-threaded environments prior to C++11. C++11 removes the need for manual locking. It guarantees concurrent execution […]
Signed integers can be used for positive, negative and zero, on the other hand, unsigned integers represents only non-negative numbers.A signed int uses the most significant […]
The [[maybe_unused]] attribute is created for indicating in code that certain logic might not be used. This is often linked to preprocessor conditions where this might […]
Dependency Injections and complicated OOP patterns may result into conflicts of lifetime/ownership relationships in a spaghetti code. Enclosing the ownership of an object in a smart […]
The algorithms library of C++ can sometimes be a little inconvenient since most of them requires a begin and an end iterator to operate (1). Utilizing […]
C++17 introduces [[nodiscard]] attribute to let the compiler deduce that the return value of a function or method must be handled by a properly assigned value. […]