Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using ll = int64_t;
  3. using ld = long double;
  4. using namespace std;
  5.  
  6. int cnt = 0;
  7.  
  8. class C {
  9. public:
  10. int b;
  11.  
  12. C() {
  13. cnt++;
  14. }
  15.  
  16. C(const C& other) {
  17. cnt++;
  18. }
  19.  
  20. C(C&& other) noexcept {
  21. cnt++;
  22. }
  23. };
  24.  
  25. C F() {
  26. C res;
  27. res.b = 3;
  28. return res;
  29. }
  30.  
  31. int main() {
  32. #ifdef PAUNSVOKNO
  33. freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
  34. #endif
  35. ios_base::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(20);
  36. C a = F();
  37. cout << cnt << "\n";
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement