kdToContainer offers a convenience operator|, basically
mimicking range-v3 / C++23's ranges::to:
vector | kdToContainer<QList>()
The operator| is defined as a hidden friend of a helper class template.
We can't however declare it "directly" inside the class template,
because it's a class template: different instantiations would redeclare
the same function. Instead, isolate it in a non-template base class.
Change-Id: I581da19cb2571b7455a1844f59c08c1fb69ca17b
Reviewed-on: https://codereview.kdab.com/c/kdab/KDToolBox/+/123540
Tested-by: Continuous Integration <build@kdab.com>
Reviewed-by: Allen Winter <allen@kdab.com>
This is some code I have had in my Qt build for a while now.
Given the barrier to put this into QtCore is too high, maybe
it's useful to publish elsewhere, so here it is.
Change-Id: I519d360920539ee2048536b4e4eeb706fe03d64f
Reviewed-on: https://codereview.kdab.com/c/kdab/KDToolBox/+/94929
Tested-by: Continuous Integration <build@kdab.com>
Reviewed-by: Ivan Čukić <ivan.cukic@kdab.com>