Just a quick post to write about something mildly important to know.
Are you not defining your own copy constructors / assignment operators for each and every single class you do? (Kudos! Waste of time TM + unexpected behaviors / bugsources!)
Stop defining empty destructors!
At least for me, the standard is to have a standard create class macro / template, and this includes an empty destructor.
Especially since visual studios create class creates the constructor and the destructor empty for you as base.
Up until C++11, this has not been a problem.
But now! With C++11 the new and cool move constructor is not autogenerated if you have an empty destructor!
If you didn’t know the rules for auto generating move constructors: ”No user-declared copy constructor, copy assignment operator or destructor. Also breaks if any of the auto generated ones are invalid.”
Basically no-nos if you want a auto generated move constructor are:
Class::Class(const Class& other)
Class& operator=(const Class& other)
Here’s a clipping of some of my tests http://imgur.com/pS8Xnql