Is there an equivalent in C++ to LINQ with respect to DataTables?
Asked
Active
Viewed 2,302 times
1
-
3Poss dup: [Is there a LINQ library for C++?](http://stackoverflow.com/questions/232222/is-there-a-linq-library-for-c). – Jesse Good May 23 '12 at 04:19
-
Agree. But its a 2-3 year old post. Has nothing changed since then? – Nishanth May 23 '12 at 05:35
1 Answers
2
Look at this linq-in-c but, imho, best way to use boolinq
for example
struct Man
{
std::string name;
int age;
};
Man src[] =
{
{"Kevin",14},
{"Anton",18},
{"Agata",17},
{"Terra",20},
{"Layer",15},
};
auto dst = from(src).where( [](const Man & man){return man.age < 18;})
.orderBy([](const Man & man){return man.age;})
.select( [](const Man & man){return man.name;})
.toVector();