Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using ll = int64_t;
- using ld = long double;
- using namespace std;
- int cnt = 0;
- class C {
- public:
- int b;
- C() {
- cnt++;
- }
- C(const C& other) {
- cnt++;
- }
- C(C&& other) noexcept {
- cnt++;
- }
- };
- C F() {
- C res;
- res.b = 3;
- return res;
- }
- int main() {
- #ifdef PAUNSVOKNO
- freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
- #endif
- ios_base::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(20);
- C a = F();
- cout << cnt << "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement