Copy & swap idiom in C++
Correctly implementing the assignment operator is often cumbersome, error-prone, memory-leak-prone, and introduces ugly, redundant code that is hard to debug. Say hello to the copy &swap idiom! The code is […]
Correctly implementing the assignment operator is often cumbersome, error-prone, memory-leak-prone, and introduces ugly, redundant code that is hard to debug. Say hello to the copy &swap idiom! The code is […]
Overloading, overriding and hiding might sometimes be confusing. Therefore I created this diagram, to simplify the process of identification and included some example code. The diagram was created in Visual […]
This article describes four facts about C++ streams I found confusing or counterintuitive. The last fact talks about correct exception handling when using fstream. Fact 1 will NOT create new […]