C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::constant_size_function

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Sun, 16 Jun 2024 01:23:33 +0100
I reply in series to Lénárd and Bjorn below.


On Fri, Jun 14, 2024 at 12:14 PM Lénárd Szolnoki wrote;
>
> You can avoid type-erasing the lambda that you are
> capturing in the std::function and store it directly.


Not sure what you mean here. Could you please provide a code snippet
or a godbolt?


On Fri, Jun 14, 2024 at 12:26 PM Bjorn Reese wrote:
>
> std::function is about type-erasure, which std::elide does not need.
> The proper tool for the job is std::bind_front.


Could you please confirm if the following is what you had in mind?

      https://godbolt.org/z/5hnfvzEYv

Received on 2024-06-16 00:23:44