LINQ for C++ is an attempt to bring LINQ-like list manipulation to C++11.
C++
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead, 156 commits behind mrange:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CppLinq
Test
.gitignore
CppLinq.sln
CppLinq2010Express.sln
README.md

README.md

cpplinq - LINQ-like list manipulations for C++11

LINQ for C++ is an attempt to bring LINQ-like list manipulation to C++11.

#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
        ;
}

Bogus change to demo github forks...

See the documentation: http://cpplinq.codeplex.com/documentation