On Sun, Dec 1, 2024 at 1:28 PM Andrey Semashev via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
On December 1, 2024 9:43:24 PM Avi Kivity <avi@scylladb.com> wrote:

> On Sun, 2024-12-01 at 21:25 +0300, Andrey Semashev wrote:
>> On December 1, 2024 7:57:45 PM Avi Kivity <avi@scylladb.com> wrote:
>>
>>> On Sun, 2024-12-01 at 19:11 +0300, Andrey Semashev via Std-
>>> Proposals
>>> wrote:
>>
>>> Or we can make it a
>>> niebloid.
>>
>> Sorry, I don't know what this means.
>
>
> A technique used in std::ranges to avoid such pointers-to-functions.
>
> template <typename T>
> struct _Impl_construct
>    template <typename... Args>
>    static T operator()(Args... args) { return
> T(std::forward<Args>(args)...); }
> };
>
> template <typename T>
> inline _Impl_construct construct;

This would make taking address of std::construct not work, which is unexpected.

std::ranges::transform(&std::construct<T>)

On the other hand, this implementation makes views::transform(construct<T>) actually work, unlike the approach specified in OP.

Barry