Advertisement
junghu1124

Untitled

Sep 7th, 2023 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. 1. 이동 생성자 코드를 사용했을 때 (// 이동 생성자 라고 각주 처리된 부분 포함)
  2. [아래는 출력 결과]
  3. (1) ============
  4. move called
  5. constructor ended
  6. destroyed
  7.  
  8. (2) ============
  9. move called
  10. constructor ended
  11. destroyed
  12.  
  13. (3) ============
  14. move called
  15. constructor ended
  16. destroyed
  17.  
  18. (4) ============
  19.  
  20. (5) ============
  21. copy called
  22. constructor ended
  23.  
  24. code fin
  25.  
  26. destroyed
  27. destroyed
  28. destroyed
  29. destroyed
  30. destroyed
  31. destroyed
  32.  
  33. 2. 이동 생성자 코드를 사용하지 않았을 때 (// 이동 생성자 라고 각주 처리된 부분 제외)
  34. [아래는 출력 결과]
  35. (1) ============
  36. copy called
  37. constructor ended
  38. destroyed
  39.  
  40. (2) ============
  41. copy called
  42. constructor ended
  43. destroyed
  44.  
  45. (3) ============
  46. copy called
  47. constructor ended
  48. destroyed
  49.  
  50. (4) ============
  51.  
  52. (5) ============
  53. copy called
  54. constructor ended
  55.  
  56. code fin
  57.  
  58. destroyed
  59. destroyed
  60. destroyed
  61. destroyed
  62. destroyed
  63. destroyed
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement