<?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: Understanding lvalues, rvalues and their references	</title>
	<atom:link href="https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Fri, 23 Aug 2019 17:37:37 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.3</generator>
	<item>
		<title>
		By: Nixon		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-1126</link>

		<dc:creator><![CDATA[Nixon]]></dc:creator>
		<pubDate>Tue, 17 Jul 2018 17:51:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-1126</guid>

					<description><![CDATA[Hi Jonathan!
I&#039;m wondering why this code compiled:
class Point{
public:
    float x;
    float y;
    Point(float x_, float y_):
        x(x_), y(y_) {}
};

template
T foo(T&#038;&#038; a)
{
    return a;
}

int main()
{
    Point p(0,0);
    foo(p);
    return 0;
}

And I didn&#039;t get the error which you mentioned in the article:
&quot;error: cannot bind rvalue reference of type &#039;MyClass&#038;&#038;&#039; to lvalue of type &#039;MyClass&#039;&quot;
Thank you for explanation and for yours marvelous articles!]]></description>
			<content:encoded><![CDATA[<p>Hi Jonathan!<br />
I&#8217;m wondering why this code compiled:<br />
class Point{<br />
public:<br />
    float x;<br />
    float y;<br />
    Point(float x_, float y_):<br />
        x(x_), y(y_) {}<br />
};</p>
<p>template<br />
T foo(T&amp;&amp; a)<br />
{<br />
    return a;<br />
}</p>
<p>int main()<br />
{<br />
    Point p(0,0);<br />
    foo(p);<br />
    return 0;<br />
}</p>
<p>And I didn&#8217;t get the error which you mentioned in the article:<br />
&#8220;error: cannot bind rvalue reference of type &#8216;MyClass&amp;&amp;&#8217; to lvalue of type &#8216;MyClass'&#8221;<br />
Thank you for explanation and for yours marvelous articles!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-818</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Tue, 13 Feb 2018 21:00:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-818</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-813&quot;&gt;Sebastien Dicaire&lt;/a&gt;.

Hi Sebastien. The above code is perfectly legal. The state of a moved-from object is said to be &quot;unspecified, but valid&quot;. And since it is valid, you can assign something into it. The unspecified means that if you read from it, you can&#039;t predict what is going to be in it.
Note that unspecified does not mean the same thing as Undefined Behaviour. UB offers no guarantee, like it could halt the program, while with unspecified you just don&#039;t know what value comes out of the object when your read it.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-813">Sebastien Dicaire</a>.</p>
<p>Hi Sebastien. The above code is perfectly legal. The state of a moved-from object is said to be &#8220;unspecified, but valid&#8221;. And since it is valid, you can assign something into it. The unspecified means that if you read from it, you can&#8217;t predict what is going to be in it.<br />
Note that unspecified does not mean the same thing as Undefined Behaviour. UB offers no guarantee, like it could halt the program, while with unspecified you just don&#8217;t know what value comes out of the object when your read it.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-817</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Tue, 13 Feb 2018 20:57:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-817</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-807&quot;&gt;Siyuan Liu&lt;/a&gt;.

By reusing the resource of the object, I mean that this object is available to be be modified, because it&#039;s going to be destroyed soon and no one can manipulate it until then. Hope that clarifies the meaning!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-807">Siyuan Liu</a>.</p>
<p>By reusing the resource of the object, I mean that this object is available to be be modified, because it&#8217;s going to be destroyed soon and no one can manipulate it until then. Hope that clarifies the meaning!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sebastien Dicaire		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-813</link>

		<dc:creator><![CDATA[Sebastien Dicaire]]></dc:creator>
		<pubDate>Tue, 13 Feb 2018 18:52:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-813</guid>

					<description><![CDATA[Is it consider UB to move a lvalue then continue to use it after the move in the context of the call site?

MyClass x;
f(std::move(x));
x.name = &quot;abc&quot;;
and so on]]></description>
			<content:encoded><![CDATA[<p>Is it consider UB to move a lvalue then continue to use it after the move in the context of the call site?</p>
<p>MyClass x;<br />
f(std::move(x));<br />
x.name = &#8220;abc&#8221;;<br />
and so on</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Siyuan Liu		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-807</link>

		<dc:creator><![CDATA[Siyuan Liu]]></dc:creator>
		<pubDate>Sat, 10 Feb 2018 14:06:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-807</guid>

					<description><![CDATA[Thanks for the article, I can easily understand the meaning of lvalues and rvalues. However, there is one thing that is a bit confusing when I read it. You say lvalue is objects whose &quot;resource&quot; cannot be reused. What exactly are you referring to when you say &quot;resource&quot;? Are you talking about the memory space it occupies?]]></description>
			<content:encoded><![CDATA[<p>Thanks for the article, I can easily understand the meaning of lvalues and rvalues. However, there is one thing that is a bit confusing when I read it. You say lvalue is objects whose &#8220;resource&#8221; cannot be reused. What exactly are you referring to when you say &#8220;resource&#8221;? Are you talking about the memory space it occupies?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Michal Barton		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-803</link>

		<dc:creator><![CDATA[Michal Barton]]></dc:creator>
		<pubDate>Wed, 07 Feb 2018 17:43:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-803</guid>

					<description><![CDATA[Thanks for the post. I know you just quote different sources but here we have it all in one place. Its really something which helps. to save time collecting all the pieces together.]]></description>
			<content:encoded><![CDATA[<p>Thanks for the post. I know you just quote different sources but here we have it all in one place. Its really something which helps. to save time collecting all the pieces together.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Foster Brereton		</title>
		<link>https://www.fluentcpp.com/2018/02/06/understanding-lvalues-rvalues-and-their-references/#comment-798</link>

		<dc:creator><![CDATA[Foster Brereton]]></dc:creator>
		<pubDate>Tue, 06 Feb 2018 22:23:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=1753#comment-798</guid>

					<description><![CDATA[The pointer that helped me out is that if it&#039;s got a name, it&#039;s an lvalue, otherwise it&#039;s an rvalue. `move` and `forward` convert lvalues (even ones to rvalues!) into rvalues. That was concise enough a concept for me to grasp, and really opened up rvalues for me.]]></description>
			<content:encoded><![CDATA[<p>The pointer that helped me out is that if it&#8217;s got a name, it&#8217;s an lvalue, otherwise it&#8217;s an rvalue. `move` and `forward` convert lvalues (even ones to rvalues!) into rvalues. That was concise enough a concept for me to grasp, and really opened up rvalues for me.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
