<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: C++ Algorithms, Boost and function currying</title>
    <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>C++ Algorithms, Boost and function currying</title>
      <description>&lt;p&gt;I&amp;#8217;ve been experimenting with C++ using the Eclipse &lt;span class="caps"&gt;CDT&lt;/span&gt; and gcc 4.4. Since I&amp;#8217;m a fan of boost, I&amp;#8217;ve been using that as well. I finally got into I realistic use of boost::bind.&lt;/p&gt;


I converted this:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;int Dice::total() const {
  int total = 0;

  for(const_iterator current = dice.begin();
      current != dice.end();
      ++current)
    total += (*current)-&amp;gt;faceValue();

  return total;
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
Into this:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;int Dice::total() const {
  return std::accumulate(
      dice.begin(),
      dice.end(),
      0,
      bind(std::plus&amp;lt;int&amp;gt;(), _1, bind(&amp;amp;Die::faceValue, _2))
  );
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;To see how to go from the first version to the final version with lots of steps in between: &lt;a href="http://schuchert.wikispaces.com/cpptraining.SummingAVector"&gt;http://schuchert.wikispaces.com/cpptraining.SummingAVector&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;This is a first draft. I&amp;#8217;ll be cleaning it up over the next few days. If you see typos, or if anything is not clear from the code, please let me know where. Also, if my interpretation of what boost is doing under the covers (there&amp;#8217;s not much of that) is wrong, please correct me.&lt;/p&gt;


	&lt;p&gt;Thanks!&lt;/p&gt;</description>
      <pubDate>Sat, 12 Jun 2010 23:41:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:549aae6e-42fc-4ae7-ad78-126667918e8d</guid>
      <author>Brett Schuchert</author>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying</link>
      <category>Schuchert's Scattered Synapses </category>
      <category>c</category>
      <category>cpp</category>
      <category>boost</category>
      <category>function</category>
      <category>currying</category>
      <category>std</category>
      <category>for_each</category>
      <category>vector</category>
      <category>shared_ptr</category>
      <category>accumulate</category>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by dfhfj</title>
      <description>&lt;p&gt;Really its a good news. I am very interested for this post. This side will be help all of us. Thanks.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://drug-rehab-help.net/" rel="nofollow"&gt;Drug Rehab Help&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 05 Feb 2012 05:17:20 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:8af474fb-784b-462d-8ebf-a1d7423c5b0d</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-201818</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by safgdh</title>
      <description>&lt;p&gt;She correctly locates Berkeley as near ground zero for Northern California food consciousness and assails the school gardens as if they were an invidious fifth column for this destructive ideology. But at the same time, she falls victim to exactly the same kind of elitist class consciousness that she purports to despise when she imagines that a second generation Latino kid in Berkeley isn&amp;#8217;t just as likely to appreciate the significance of organic arugula as my own white-as-Wonder Bread 12-year-old son, who makes a habit stopping off at the Tuesday farmers&amp;#8217; market on his way home from school looking for something tasty to nibble and who is far more comfortable with the concept of cilantro than his father ever was at that age.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://drug-rehab-help.net/" rel="nofollow"&gt;Drug Rehab Help&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 05 Feb 2012 05:14:50 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:72bd268d-ea3a-44fd-ab59-7f59ae4205f8</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-201817</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by online docs</title>
      <description>&lt;p&gt;you are good at c++ code.&lt;/p&gt;</description>
      <pubDate>Tue, 17 Jan 2012 03:50:11 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:eabf32a4-30e7-4e87-b802-9dbe6e09b8d1</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-198280</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by shovon dds</title>
      <description>&lt;p&gt;Thanks for this article. Its really a good topic. I like this side. Give me some information about this side.It will help me a lot.Thanks.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://dualdiagnosis-treatment.com/" rel="nofollow"&gt;Dual Diagnosis Treatment&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 21 Dec 2011 13:11:56 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d5e72659-b66b-4303-a709-f003ce6af967</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-190232</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by noman dds</title>
      <description>&lt;p&gt;Its really a good article. This site is so helpful. I want to know some other information about this post. So please give some other information about this side,Thanks.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://drugaddiction-rehab.net/" rel="nofollow"&gt;Drug Addiction Rehab&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 15 Dec 2011 00:23:25 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:0e0484cf-e8b8-4b9a-b055-40e1aabc66b7</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-186944</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by sachin dsd</title>
      <description>&lt;p&gt;Its really a good article. This site is so helpful. I want to know some other information about this post. So please give some other information about this side,Thanks.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://vicodinandalcohol.net/" rel="nofollow"&gt;Vicodin And Alcohol&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 01 Dec 2011 05:31:17 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ef201442-c740-4e94-8f47-749d08a4cfa8</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-180687</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by sachin dsd</title>
      <description>&lt;p&gt;I uncover black females, i feel from Kenya not positive , to be really beautiful. I love dark, black skin, mashallah. The whites on the eyes, and teeth shine through, and combined with their substantial cheek bones subhanallah&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://drug-abuse-counseling.com/" rel="nofollow"&gt;Drug Abuse Counseling&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 01 Dec 2011 01:03:14 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:67d83b31-d2c7-44bf-89e0-b41314e082d4</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-180527</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Spyder Jackets</title>
      <description>&lt;p&gt;&lt;a href="http://www.spyderjackets-outlet.net" rel="nofollow"&gt;http://www.spyderjackets-outlet.net&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 18 Nov 2011 01:26:21 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:46cc5505-9fec-445c-9a61-c534d76754b4</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-175268</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Spyder Jackets</title>
      <description>&lt;p&gt;&lt;a href="http://www.spyderjackets-outlet.net" rel="nofollow"&gt;http://www.spyderjackets-outlet.net&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 18 Nov 2011 01:15:52 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:8fe2366c-4007-4698-9ec1-7a04f9cef58f</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-175263</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by hhtk oli</title>
      <description>&lt;p&gt;Wonderful web blog article.I am really satisfied  to earn lots of knowledge to read the site.Its a great habit to knowing good things like this,so thanks a lot.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://somaaddiction.net/" rel="nofollow"&gt;Soma Addiction&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 14 Nov 2011 04:48:16 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ea7e8041-fc5b-4fb0-8f1d-55f3fbe0f69f</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-172499</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Property Marbella</title>
      <description>&lt;p&gt;Nothing is impossible for a willing heart.&lt;/p&gt;</description>
      <pubDate>Fri, 28 Oct 2011 13:50:26 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2e05b14e-3be6-4e1e-ae36-c3e564cc70c1</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-165209</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Property Marbella</title>
      <description>&lt;p&gt;I completely happy that I have discovered your web page, I&#8217;ve a great deal to read here&lt;/p&gt;</description>
      <pubDate>Fri, 28 Oct 2011 13:46:28 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:303b0926-c7cf-4014-92db-5b1322b149ab</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-165208</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Beads Pandora</title>
      <description>&lt;p&gt;Whether pandora wholesale you have been unable to find a stylish and beautiful shape of the necklace? Then small series with a look at the beauty of these big fake collar necklace has a lovely pandora charm retro small lapel T units for two consecutive quarters as the most popular fashion point. This winter, a small lapel is not limited to fashion, it is more to necklaces pandora necklace discount &lt;a href="http://www.topcharmjewelry.com/Pandora-Gift-Sets_4_1.htm" rel="nofollow"&gt;Pandora Jewelry&lt;/a&gt; of the field, the most tide &#8220;false collar necklace this year, major fashion brand designers start of the article on the collar, 2011 Milan Fashion Week on, a dazzling white pointed collar &lt;a href="http://www.topcharmjewelry.com/Pandora-Gift-Sets_4_1.htm" rel="nofollow"&gt;Pandora Bracelets&lt;/a&gt; collective debut. Chanel&#8217;s little black dress with small round white mix is has become a classic, shot in the street this year is everywhere now This stock has fallen a false collar style accessories &lt;a href="http://www.topcharmjewelry.com/Pandora-Earrings_2_1.htm" rel="nofollow"&gt;Pandora Earrings&lt;/a&gt;. than the fabric is too low silver pandora chains round neck, collar necklace of fake luxury metal may dazzling land and more. false collar means is a fabric made into a good texture a collar and this collar no &lt;a href="http://www.topcharmjewelry.com/Pandora-Pendants_6_1.htm" rel="nofollow"&gt;pandora necklaces silver&lt;/a&gt; bracelets sleeves, no breast, no back, just only a collar, so call it false lead. the most beautiful moment of a woman&#8217;s life is put on the holy wedding, into the wedding hall, the love will be forever a &lt;a href="http://www.topcharmjewelry.com/Festival_7_1.htm" rel="nofollow"&gt;Beads Pandora&lt;/a&gt; when worn on the finger.&lt;/p&gt;</description>
      <pubDate>Thu, 27 Oct 2011 20:30:39 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:23b1b64e-95b8-415d-9e22-d559dc5ab141</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-164813</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by shoppingpandora</title>
      <description>&lt;p&gt;It&#8217;s really a nice and helpful piece of information.Long time no see so excellent article, and I am very interested in your article, but also very much hope you can come to visit our website&lt;a href="http://www.shoppingpandora.net" rel="nofollow"&gt;shoppingpandora&lt;/a&gt;@&lt;a href="http://www.shoppingpandora.net" rel="nofollow"&gt;pandora charms on sale&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 24 Oct 2011 03:02:29 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4d5bf120-045d-4246-a615-2c7fbb755535</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-162478</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by ysbearing/yisong@1stbearing.com</title>
      <description>&lt;p&gt;Slewing ring is also called slewing bearing, some people called: rotary support, swing support. English Name: slewing bearing or slewing ring bearing or turn table bearing, slewing ring in the real industrial applications is very wide.&lt;/p&gt;</description>
      <pubDate>Wed, 19 Oct 2011 00:59:26 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:513f0cfa-7102-44f1-a4cb-5c4c02805e53</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-159247</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by nnkh alad</title>
      <description>&lt;p&gt;Hello,to all the visitors of this great site.I read and know all things of this article.Its look like me a great things and idea to know about a very important information.If anyone visit this site,they will be very satisfied to look this article.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://stimulantabuse.net/" rel="nofollow"&gt;Stimulant Abuse&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 17 Oct 2011 05:01:38 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a48d7a7a-4123-4515-9502-fae02ec2d57b</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-158485</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Tissot Classic watch</title>
      <description>&lt;p&gt;&lt;a href="http://www.topwatchesshop.org" rel="nofollow"&gt;Tissot Watch&lt;/a&gt; are being sold, he had to design some bright spots, &lt;a href="http://www.topwatchesshop.org" rel="nofollow"&gt;Tissot Classic watch&lt;/a&gt; is a classic of classics, as well as &lt;a href="http://www.topwatchesshop.org" rel="nofollow"&gt;Tissot Sports watch&lt;/a&gt; is favorite of many boys, &lt;a href="http://www.topwatchesshop.org" rel="nofollow"&gt;Tissot Trend watch&lt;/a&gt;, whether it is sent to bring their own or friends are the only choice, is a well-known watch brand Tissot, &lt;a href="http://www.topwatchesshop.org/tissot-new_14_1.htm" rel="nofollow"&gt;tissot watch&lt;/a&gt;, so I chose is not wrong.&lt;/p&gt;</description>
      <pubDate>Sun, 16 Oct 2011 22:29:35 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b5fc7087-7920-4c94-a57e-40c363080728</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-157630</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Amphetamine Abuse</title>
      <description>&lt;p&gt;I like it very much. Its so interesting. Its a very useful article. I like the way you explain the things. Keep posting. Thanks&lt;/p&gt;</description>
      <pubDate>Sun, 16 Oct 2011 22:10:45 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6b5a5a87-e360-476f-b22a-f9635738eb31</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-157544</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Amphetamine Abuse</title>
      <description>&lt;p&gt;Hey, guy, your blog is nice. It can bring me many useful information.A good post please keep going thanks&lt;/p&gt;</description>
      <pubDate>Sun, 16 Oct 2011 22:09:11 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b39b58c7-b7b0-440c-bedd-b777807659af</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-157535</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by ama ahlu</title>
      <description>&lt;p&gt;It is really help to us. Its give us lots of interest and pleasure. Its opportunity are so fantastic and working style so speedy. Its really a good article. It gives me lots of pleasure and interest.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://crack-abuse.com/" rel="nofollow"&gt;Crack Abuse&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 16 Oct 2011 01:13:52 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f6ee998b-f28b-4394-8e01-badad84e7064</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-157296</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by doye lmia</title>
      <description>&lt;p&gt;It is a nice article.This site has lots of information. I found many interesting things from this site. It helps me many away. So many many thanks for sharing this information.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.roofingexpertsonline.com/" rel="nofollow"&gt;roofing companies&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 11 Oct 2011 06:50:10 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c1351b68-bb0d-4530-a070-177ac404047e</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-154536</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Ovei 220</title>
      <description>&lt;p&gt;Hi, I wanted to drop you a quick note to express my thanks. I&amp;#8217;ve been following your blog for a month or so and have picked up a ton of good information as well as enjoyed the way you&amp;#8217;ve structured your site. I am attempting to run my own blog but I think its too general and I want to focus more on smaller topics. Being all things to all people is not all that its cracked up to be.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.soswaterdamage.com/" rel="nofollow"&gt;mold damage&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 11 Oct 2011 06:08:06 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:42585c4e-6ea8-4bbc-93a5-52754c72317c</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-154517</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Ovei 220</title>
      <description>&lt;p&gt;I like it very much. Its so kind to see it. Its a very useful article.people can easily the things you have submitted.That&amp;#8217;s why I like the way you explain the things. Keep posting more. Thanks&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.soswaterdamage.com/" rel="nofollow"&gt;flooded basement&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 11 Oct 2011 02:00:14 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:eb703cbe-c577-42c7-9962-40eb1deb52f5</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-154176</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by Christian</title>
      <description>&lt;p&gt;as as+d0f9g8d+g8ddd&lt;/p&gt;</description>
      <pubDate>Mon, 10 Oct 2011 22:31:03 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f6ec80ea-338d-4284-8a9a-9a620910265f</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-153841</link>
    </item>
    <item>
      <title>"C++ Algorithms, Boost and function currying" by moncler</title>
      <description>&lt;p&gt;asdfs df+gsd8+ ddd&lt;/p&gt;</description>
      <pubDate>Mon, 10 Oct 2011 22:27:16 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9b25fcb9-4584-46aa-b936-bba95a0fc714</guid>
      <link>http://blog.objectmentor.com/articles/2010/06/12/c-algorithms-boost-and-function-currying#comment-153823</link>
    </item>
  </channel>
</rss>

