A move special member function is a move constructor or move assignment operator that transfers resources from another object. Moving can avoid copies, but a move request may perform a copy when the type is not move-enabled. section 6.1.4
Keep these language rules in mind:
- A user-declared destructor prevents C++ from generating move operations implicitly. section 6.1.4
- Declaring the move constructor and move assignment operator as =default restores defaulted moves; deleting or declaring one special member can affect the others. section 6.1.4
- The rule of five recommends deliberately declaring or deleting all five special members when resource ownership requires it; the rule of zero accepts suitable defaults. section 6.1.4
Checking a resource-owning Blob
Type traits can test whether Blob accepts rvalues, but is_move_constructible and is_move_assignable do not prove that a move constructor or move assignment operator exists. They may report true when copying through a const lvalue reference is possible. Static assertions can expose that Blob is neither copyable nor movable. section 6.1.4
