Are there any C++ transformations which are similar to itertools.groupby()?
Of course I could easily write my own, but I\'d prefer to leverage the idiomatic behavior
Eric Niebler's ranges library provides a group_by view.
according to the docs it is a header only library and can be included easily.
It's supposed to go into the standard C++ space, but can be used with a recent C++11 compiler.
minimal working example:
#include
(I compiled this with clang 3.9.0. and --std=c++11
)