Date: Sun, 16 Jun 2024 08:28:16 -0700
On Saturday 15 June 2024 17:23:33 GMT-7 Frederick Virchanza Gotham via Std-
Proposals wrote:
> Not sure what you mean here. Could you please provide a code snippet
> or a godbolt?
Don't type erase. Store the lambda type directly. Which is exactly what you
had before you tried to make things simpler by using std::function.
But you didn't make them simpler. You made it more worse, by requiring a type
that doesn't exist, because it attempts to use something that is meant for
type-erasing in a scenario where no erasing is possible.
Proposals wrote:
> Not sure what you mean here. Could you please provide a code snippet
> or a godbolt?
Don't type erase. Store the lambda type directly. Which is exactly what you
had before you tried to make things simpler by using std::function.
But you didn't make them simpler. You made it more worse, by requiring a type
that doesn't exist, because it attempts to use something that is meant for
type-erasing in a scenario where no erasing is possible.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Fleet Systems Engineering
Received on 2024-06-16 15:28:26