C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::construct<T>

From: Jan Schultke <janschultke_at_[hidden]>
Date: Tue, 15 Jul 2025 15:59:31 +0200
I recall discussing this with other people at some point; not sure if
there's already an existing proposal for it.

I think it's well-motivated; we have function objects for std::plus/+
and other sort of builtin things that you cannot (always) for a
function pointer to, and this fits right in with those.

However, std::construct is a bad name. You're basically making a
callable type in the style of std::plus and std::less; all of those
are named using a noun, presumably because they are not functions.
std::construct sounds dangerously close to std::construct_at; there's
some potential for confusion.

Something like std::construction or std::constructor would be more
fitting for that type.

Received on 2025-07-15 13:59:49