Daily bit(e) of C++ | Concepts as template arguments
Daily bit(e) of C++ #417, A trick for passing a C++20 concept as an argument of a template.
A current limitation of concepts is that we cannot pass concepts as arguments to templates. At least not directly.
The following trick by Filip Sajdak allows us to wrap concepts in lambdas and then pass those lambdas as non-type template arguments. With the help of an indirection concept, we can then check types against this wrapped concept.