<?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: How to Retrieve the Firsts from a Collection of Pairs	</title>
	<atom:link href="https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/</link>
	<description>Jonathan Boccara&#039;s blog</description>
	<lastBuildDate>Sun, 11 Nov 2018 13:01:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.4</generator>
	<item>
		<title>
		By: jft		</title>
		<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1460</link>

		<dc:creator><![CDATA[jft]]></dc:creator>
		<pubDate>Sun, 11 Nov 2018 13:01:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2276#comment-1460</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1458&quot;&gt;Jonathan Boccara&lt;/a&gt;.

Yeah - A lambda can take an auto parameter whereas a function can&#039;t. Nice one! :)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1458">Jonathan Boccara</a>.</p>
<p>Yeah &#8211; A lambda can take an auto parameter whereas a function can&#8217;t. Nice one! 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonathan Boccara		</title>
		<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1458</link>

		<dc:creator><![CDATA[Jonathan Boccara]]></dc:creator>
		<pubDate>Sat, 10 Nov 2018 19:18:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2276#comment-1458</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1455&quot;&gt;dslater&lt;/a&gt;.

I might have been wrong here, but the point of the lambda is that we can pass it to the algorithm, which we can&#039;t for a function in this case because it would have been a template function. We would have had to specify the template type parameter (here the type of the pair) at call site.
Does this seem reasonable to you?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1455">dslater</a>.</p>
<p>I might have been wrong here, but the point of the lambda is that we can pass it to the algorithm, which we can&#8217;t for a function in this case because it would have been a template function. We would have had to specify the template type parameter (here the type of the pair) at call site.<br />
Does this seem reasonable to you?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jft		</title>
		<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1456</link>

		<dc:creator><![CDATA[jft]]></dc:creator>
		<pubDate>Sat, 10 Nov 2018 15:33:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2276#comment-1456</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1455&quot;&gt;dslater&lt;/a&gt;.

I would have considered this for a lambda rather than a function only if I wanted the lambda to be specific to a function - as C++ doesn&#039;t allow nested functions.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1455">dslater</a>.</p>
<p>I would have considered this for a lambda rather than a function only if I wanted the lambda to be specific to a function &#8211; as C++ doesn&#8217;t allow nested functions.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: dslater		</title>
		<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1455</link>

		<dc:creator><![CDATA[dslater]]></dc:creator>
		<pubDate>Sat, 10 Nov 2018 14:34:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2276#comment-1455</guid>

					<description><![CDATA[Defining get_first I the util namespace with a lambda that captures nothing is just silly. It should just be defined as a normal named function.]]></description>
			<content:encoded><![CDATA[<p>Defining get_first I the util namespace with a lambda that captures nothing is just silly. It should just be defined as a normal named function.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Shreyans		</title>
		<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1454</link>

		<dc:creator><![CDATA[Shreyans]]></dc:creator>
		<pubDate>Sat, 10 Nov 2018 06:39:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2276#comment-1454</guid>

					<description><![CDATA[Ranges are great for such transformations. It just makes the code so elegant..]]></description>
			<content:encoded><![CDATA[<p>Ranges are great for such transformations. It just makes the code so elegant..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Piotr Nycz		</title>
		<link>https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs/#comment-1452</link>

		<dc:creator><![CDATA[Piotr Nycz]]></dc:creator>
		<pubDate>Fri, 09 Nov 2018 07:55:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.fluentcpp.com/?p=2276#comment-1452</guid>

					<description><![CDATA[Interesting idea with defining function as variable (Utinls::get_first) (+1). I would try to make it constexpr. But defining it as functor class with operator() template would give the possibility for specializing that operator for various types? it is not possible for lambda. BTW - since C++17 `using std::get;  return get(obj);` is more canonical form  of getting first element - works for pair, tuple, array]]></description>
			<content:encoded><![CDATA[<p>Interesting idea with defining function as variable (Utinls::get_first) (+1). I would try to make it constexpr. But defining it as functor class with operator() template would give the possibility for specializing that operator for various types? it is not possible for lambda. BTW &#8211; since C++17 `using std::get;  return get(obj);` is more canonical form  of getting first element &#8211; works for pair, tuple, array</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
