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