Quantcast
Channel: cpplinq Releases Rss Feed
Viewing all articles
Browse latest Browse all 20

Updated Release: cpplinq-20130810 (aug 10, 2013)

$
0
0
LINQ for C++ (cpplinq) is an extensible C++11 library of higher-order functions for range manipulation. cpplinq draws inspiration from LINQ for C#.

This release includes just the source code.

What's new in this release:
  • Non standard #pragma once replaced with header guards
  • first() added
  • throw() removed from range::operator>> (in order to enable operators such a first() to throw on empty sequences)
  • const correctness fixes
  • code style fixes
  • Returns reference to locally scoped instance fixed

Thanks to:
  • breyed - for the implementation of first() and discussions regarding the return value semantics of cpplinq.
  • stl - for sorting out a bug in cpplinq regarding exceptions.
  • mwpowellhtx - for pointing out that #pragma once is non standard

Tested on:
  • VS2012
  • VS2013 (preview)
  • g++ 4.7.2 (with -std=c++0x)

This is a sample on how to use cpplinq:
#include "cpplinq.hpp"int computes_a_sum ()
{
    usingnamespace cpplinq;    
    int ints[] = {3,1,4,1,5,9,2,6,5,4};

    // Computes the sum of all even numbers in the sequence abovereturn 
            from_array (ints)
        >>  where ([](int i) {return i%2 ==0;})     // Keep only even numbers>>  sum ()                                  // Sum remaining numbers
        ;
}

See documentation for more details.

Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>