How to fake a singleton in C++

When unit testing legacy code I find several (anti) patterns which prevent getting code under test. The most recurring pattern I see is the Singleton pattern – a useful pattern when not abused and overused.In the object oriented world Singleton’s are slightly better than their evil cousin – the static method. Unfortunately I’ve seen them … Continue reading How to fake a singleton in C++

Syntax error when using explicitly defaulted/deleted functions in windows phone 8 project (C++11)

A few days ago a colleague of mine asked me to help with strange errors his C++ project kept throwing at him.Since it was a C++ project we had more than 200 compilation errors but as the  C++ veterans that we are we’ve ignored most of them and scrolled up until we’ve found the patient … Continue reading Syntax error when using explicitly defaulted/deleted functions in windows phone 8 project (C++11)