Dependency free, header-only, low overhead.
With Raman you can manipulate ranges easily: transform, filter, sort, etc.
Using Raman will make your code expressive, readable and short. Examples:
raman::From(input).Where(<lambda>);
raman::From(input).Sort();
raman::From(input).Reverse();
Of course, you can combine multiple methods very easily, like:
raman::From(input).Where(<lambda>).Sort().Reverse();
Every usage of Raman begins by wrapping your range (be it a container or a pair
of iterators) with raman::From()
. You may use any STL or STL-like container /
iterator.
Once wrapped, you may use any of the utility functions in
raman.hpp to manipulate your ranges, like Where()
,
AddressOf()
, Sort()
, Reverse()
, etc.
Raman is designed to be used with range-based for loop, like:
for (const auto& i : raman::From(input).Where(<lambda>)) {
// ...
}
Raman also has a convenient implicit-cast operator, so you can copy the manipulated range to any container, like:
list<int> l = ...;
vector<int> list_to_vector = raman::From(l).Where(<lambda>);
Raman also supports move-semantics, so the following is safe:
for (string s : raman::From(GetStrings()).Sort().Unique().Reverse()) {
// ...
}
In this case Raman will take ownership of the container returned by
GetStrings()
.
Start by reading the comment in the beginning of raman.hpp, then the test cases in tests.cpp.
Now that you know roughly how to use Raman, simply #include "raman.hpp"
and
you're ready to go. No dependencies, no linking.
Feel free to file bugs, ask questions or send pull requests!