<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	Comments on: Return value optimizations	</title>
	<atom:link href="https://www.fluentcpp.com/2016/11/28/return-value-optimizations/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2016/11/28/return-value-optimizations/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Mon, 18 Sep 2017 07:10:53 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Rainer Koppler		</title>
		<link>https://www.fluentcpp.com/2016/11/28/return-value-optimizations/#comment-440</link>

		<dc:creator><![CDATA[Rainer Koppler]]></dc:creator>
		<pubDate>Tue, 25 Jul 2017 14:15:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=86#comment-440</guid>

					<description><![CDATA[Concerning your example of non-applicability of RVO, there is no problem with the two paths returning different objects. As you wrote, the object has to be created on the return statement. The address of the target object is passed to f(), so when control reaches one of the two return statements, everything is known to create the object on the target address using the constructor arguments given in the return statement. I verified it using CompilerExplorer, no additional temporaries.]]></description>
			<content:encoded><![CDATA[<p>Concerning your example of non-applicability of RVO, there is no problem with the two paths returning different objects. As you wrote, the object has to be created on the return statement. The address of the target object is passed to f(), so when control reaches one of the two return statements, everything is known to create the object on the target address using the constructor arguments given in the return statement. I verified it using CompilerExplorer, no additional temporaries.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bartlomiej Filipek		</title>
		<link>https://www.fluentcpp.com/2016/11/28/return-value-optimizations/#comment-60</link>

		<dc:creator><![CDATA[Bartlomiej Filipek]]></dc:creator>
		<pubDate>Fri, 20 Jan 2017 09:31:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=86#comment-60</guid>

					<description><![CDATA[Thanks for the clear explanation. So this is another reason to have small/coherent functions so that compiler can perform more optimizations. 

Worth to add: when RVO is not possible the next candidate for optimization is to use move semantics. Then, if that fails, we use copy operations.]]></description>
			<content:encoded><![CDATA[<p>Thanks for the clear explanation. So this is another reason to have small/coherent functions so that compiler can perform more optimizations. </p>
<p>Worth to add: when RVO is not possible the next candidate for optimization is to use move semantics. Then, if that fails, we use copy operations.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
