Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class A
- {
- public:
- A()
- {
- cout << "Def Constr" << endl;
- }
- A(const A&)
- {
- cout << "Copy Constr" << endl;
- }
- };
- A func1()
- {
- return A{};
- }
- void func2(A a)
- {
- cout << "Hello" << endl;
- }
- int main()
- {
- func2(func1());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement