LINQ-like List Manipulation in C++

Save to:
Instapaper Pocket Readability

Cross platform LINQ for C++ 

LINQ-like List Manipulation in C++

by Gaston Hillar

From the article:

When developers make the move from C# to C++, they definitely miss Language-Integrated Query (LINQ) features. Cpplinq is an excellent open-source project that uses C++11 features to provide extensible LINQ-like list manipulation to C++.

I'm sad to say Farewell Dr. Dobb's. Thank you for all the good articles.

Add a Comment

Comments are closed.

Comments (1)

0 0

Sektor said on Dec 19, 2014 03:32 AM:

I personally think it would be much more readable with boost::lambda:

auto highest_score = from_array(games)
>> where(bind(&game::played_count, _1) > 0)
>> select(bind(&game::high_score, _1))
>> max();

Would be nice if it can be said '_1.played_count' in C++ (or have some other kind of possible recognition of the class type for a member so that it doesn't have to be explicitly specified), but it looks still better.