Wasn’t aware that, in C++
Foo myVar = myMakeFoo();
will not call any copy constructors, move constructors or assignment operator overloads. Looks like myVar’s address is just passed into myMakeFoo() as the return value address and constructed in place w/o copying. Clever!
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!