You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These operations are frequently error prone (missing argument, wrong initialization) and may be encountered frequently in old project (prior to C++11).
Yours.
The text was updated successfully, but these errors were encountered:
I actually came by to mention a variation on this, it would even be useful to generate the block of standard defaults for all of these, even without definitions, to make it easy to explicitly default and/or delete constructors in a new class. This is actually one of my more time-consuming boilerplate tasks when working through modernizing code. For example, given the Test class in the OP , generate default definitions could generate this in either the header or (with the class-name prefix) the implementation:
Almost the same for declarations would also be great, just without the = ..., for explicitly declaring that the constructors and destructor will be provided in an implementation file and avoiding the compiler generating them in all TUs:
Test();
Test(const Test &);
Test(Test &&);
operator=(const Test &);
operator=(Test &&);
~Test();
It feels like this would be easier than having to generate equivalent versions, and it would actually in some cases generate better code as long as the user can use c++11+.
Hi,
first of all, thank you for your extension.
I have two suggestions for new features :
Given a class like that :
It would be nice to have possibility to create definition for copy constructor and operator= :
And :
These operations are frequently error prone (missing argument, wrong initialization) and may be encountered frequently in old project (prior to C++11).
Yours.
The text was updated successfully, but these errors were encountered: