cpplinq-20120926

Rating: No reviews yet
Downloads: 14
Change Set: 638926e5a684
Released: Sep 26, 2012
Updated: Sep 26, 2012 by marten_range
Dev status: Beta Help Icon

Recommended Download

Application cpplinq.hpp
application, 78K, uploaded Sep 26, 2012 - 14 downloads

Release Notes

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.

A major change for this release is the relaxation of the requirements of front() so that it allows references as well. In effect this should give better performance when dealing with objects that expensive to copy.


This is a sample on how to use cpplinq:
#include "cpplinq.hpp"

int computes_a_sum ()
{
    using namespace cpplinq;    
    int ints[] = {3,1,4,1,5,9,2,6,5,4};

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

See documentation for more details.

Reviews for this release

No reviews yet for this release.