<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>krishnaraj varma&#039;s blog &#187; C++ox</title>
	<atom:link href="http://www.krvarma.com/category/posts/cplusplus0x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.krvarma.com</link>
	<description></description>
	<lastBuildDate>Sun, 31 Oct 2010 15:47:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Lambda Expressions in C++0x</title>
		<link>http://www.krvarma.com/2008/06/lambda-expressions-in-c0x/</link>
		<comments>http://www.krvarma.com/2008/06/lambda-expressions-in-c0x/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 06:47:55 +0000</pubDate>
		<dc:creator>Krishnaraj Varma</dc:creator>
				<category><![CDATA[C++ox]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://www.krvarma.com/?p=15</guid>
		<description><![CDATA[Lambda expressions are coming to C++. In the next version of C++ standard, C++0x, lambda expressions will be included. In C++0x a lambda expressions is in the form of [...](&#8230;}{&#8230;} where 1. [...] indicates it is a lambda expression 2. (&#8230;) declares the parameters 3. {&#8230;} defines the expressions ie. the code of the lambda [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Lambda expressions are coming to C++. In the next version of C++ standard, C++0x, lambda expressions will be included. </p>
<p>In C++0x a lambda expressions is in the form of <strong>[...](&#8230;}{&#8230;}</strong> where </p>
<p>1. [...] indicates it is a lambda expression<br />
2. (&#8230;) declares the parameters<br />
3. {&#8230;} defines the expressions ie. the code of the lambda expression</p>
<p>example:<br />
<code>// vector to store some integer values<br />
std::vector&lt;int&gt; v;</p>
<p>// Add some values<br />
v.push_back(1);<br />
v.push_back(2);<br />
v.push_back(3);   </p>
<p>// print the values<br />
std::for_each(v.begin(); v.end(), [&#038;]( const int&#038; n ) { cout << n << " "; });</p>
<p>int nTotal = 0;</p>
<p>// find the total<br />
std::for_each(v.begin(); v.end(); [&#038;total](int n){ total+=n; });<br />
</code><br />
This <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2550.pdf"> document </a> describes the lambda expression proposal. For a detailed explanation visit <a href="http://herbsutter.spaces.live.com/blog/cns!2D4327CC297151BB!785.entry"> Herb Sutter's post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krvarma.com/2008/06/lambda-expressions-in-c0x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

