rvo tag

1 questions


1 answers
164 views
0
Can't the constructor be called when creating a temporary object with a return value?

#include <iostream>class Point{ int x, y;public: Point (int a = 0, int b = 0): x(a), y(b) {std::cout << execute creator<< std::endl;} friend Point operator+(const Point& p1, cons...


© 2024 OneMinuteCode. All rights reserved.