Em 07/05/2016 15:17, Dimitry Sibiryakov escreveu: > 07.05.2016 20:00, Adriano dos Santos Fernandes wrote: >> No, just no! It will not do this! >> >> You're free to write minimal test case compiling with maximum >> optimization to demonstrate this. >> >> You will fail, I know. > > Try attached test and notice "B destructed" in the middle of output. >
And you want what? This is not a copy constructor!! B(A& f) { printf("B copy constructor invoked\n"); v = f.v; } It needs to create and destroy a temporary B. Optimizations on/off does not even affect this code. Adriano ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel