Open evilenzo opened 2 years ago
This approach seems completely backwards, for starters it adds a bunch of (implicit) copy constructors and that's totally not necessary, and also, the new move constructor doesn't move!
It would be much better to stop defining an empty destructor (which is equivalent to what the compiler would do anyways) and just default the move constructor, so the shared pointer would get moved
Ok. My point was to implement all functions of rule of five to not be aware if compiler won't generate move/copy ctors and assignment operators. If we wan't to produce less redunant code, we must follow standard which says that compiler will generate both copy and assignment functions if we doesn't have user-defined destructor. The main problem is this line. User-defined destructor means that compiler won't support us
Also this file has other ctors and dtors that are defaulted. If it is the matter of style so why we won't change them to {} too?
Solves this issue: https://github.com/microsoft/cpprestsdk/issues/1667