fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Block {
  5. int number;
  6.  
  7. ~Block() {
  8. cout << "delete!" << endl;
  9. }
  10. };
  11.  
  12. void function(const Block &&block) {
  13. }
  14.  
  15. int main() {
  16. Block block;
  17.  
  18. function(std::move(block));
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
delete!