Since C++11 you can use std::thread, std::mutex and std::atomic for your multithreaded projects. The biggest problem with multithreading is the
Continue readingCategory: Development
Destruction order (C++)
The variables/fields getting cleanup in the reverse order they have been declared (not initialized). … Objects are created # Cleanup
Continue readingCyclic dependencies (C++)
Issue The cyclic dependency is a problem which occurs if two classes includes each other in their header. hen.hpp egg.hpp
Continue readingOperating System APIs (C++)
Before using the OS APIs directly, take a look if the STL or boost already provides this functionality. Also be
Continue readingCode documentation (Doxygen)
If you are working at a huge software project it’s important to always write a documentation. This is important cause
Continue readingWhen to use which cast (C++)
Types Type Area Risk static_cast – Converts fundamental types– Non-const to const– Down-casts (dangerous) Medium dynamic_cast – Down- and side-casts
Continue readingUnit testing series – Test with Stub (Part 4)
The second szenario is using a stub. Stub Test App Exec $ g++ -c UserInterface.cpp WindowManager.cpp $ ar rcs libwnd.a
Continue readingUnit testing series – Test without double (Part 3)
The first test szenario isn’t using a double. Test App Exec $ g++ -c UserInterface.cpp WindowManager.cpp $ ar rcs libwnd.a
Continue readingCyclic references (C++)
Problem The following code shows the problem of a cyclic reference with shared pointers. When leaving the main function the
Continue readingFunction pointer vs. std::function vs Function template
Showcase Code ▼ Compiler ▼ – Tool: godbolt.org – Compiler: x86-64 Clang 16.0.0 – Args: -std=c++20 – Output: Intel asm
Continue reading