Crazy idea: reducing function coloring in function templates and enabling reuse, is it possible by caller-injected marker?
I was reading a paper about resumable functions short ago and I wonder if a language extendion would be possible that would work the following way:
// Poor man's syntax
std::copyif(myrange, coawaitable (...) { coawait ... });
How would it work? Taking advantage that templates are code to be generated, at the place where the function is called, the compiler would generate a coawait for the function, making it reusable.
https://redd.it/1u4nyp5
@r_cpp
Post #25415
12