Namespace gh4ck3r
is applied to entire snippets.
- a type that fetch value from
GETTER()
on first demand. - can be assigned with a value prior to
GETTER()
GETTER
is gone once it has a value by any means.
std::ostream
wrapper that is capable of indentation.- Indentation level can be adjusted via
indent()
,unindent()
method or manipulator like one defined in iomanip (e.g. std::hex).
Dump linear buffer to std::string
. Following forms are possible.
hexdump(ptr, len)
: dump from givenptr
tolen
in byte unit.hexdump(beg, end)
: dump iterator based range
Concatenate constexpr
containers, i.e. std::array, std::string_view.
concat<string_view, string_view, ...>()
: concatenate givenstring_view
s- Template parameters should have
static
storage class. - Concatenated string_view ended with
null
.
- Template parameters should have
concat(std::array...)
: concatenate givenstd::array
s
Function recipe(invocable1, invocable2, ...)
returns a lambda function which
forward given arguments to invocable1
and forward its return to next one until
last argument which returns final return value. It's similar to std::range
from C++20 semantically.