This project is read-only.

What does groupby return

Jan 22, 2015 at 3:25 PM

I've got an application where I need to potentially groupby some results, but I'm not entirely clear what groupby returns.

In my naivety, I'm not sure that's something like:
std::map<K, std::vector<V>>
Or somehow be able to select not only key, but also whatever collection(s) are behind the key.

Additionally, multimap would be interesting, but that's a whole other discussion...
Jan 30, 2015 at 5:18 PM
cpplinq doesn't have groupby yet.

Whenever I need something like I use to_lookup which returns a lookup<>.

lookup[key] returns a cpplinq range.
May 3, 2016 at 4:17 PM
Edited May 3, 2016 at 4:17 PM
Sorry, if it's indicated somewhere in the documentation but I couldn't find it...
How can I iterate over a lookup<> ?
and how can I check if a key exists in it ?