This project is read-only.

cpplinq-20130203

Rating: No reviews yet
Downloads: 375
Change Set: 4ce687c82d0d
Released: Feb 3, 2013
Updated: Aug 27, 2013 by marten_range
Dev status: Stable Help Icon

Downloads

Source Code cpplinq.hpp
source code, 189K, uploaded Feb 3, 2013 - 375 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.

What's new in this release:
  • singleton() added
  • generate() added
  • to_opt() added
  • pairwize() added
  • zip_with() added

Many thanks d95danb for providing the bulk of this functionality and to mariusbancila for doing an excellent job on the documentation (as well as providing functionality)

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.