C++ Logo

std-discussion

Advanced search

Re: default_new?

From: Antony Peacock <ant.peacock_at_[hidden]>
Date: Wed, 23 Nov 2022 16:25:57 +0000
But we do have proposals which include std::default_copy (p0201r6
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0201r6.html> &
p1950r2
<https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1950r2.html>)
which is as close of an analogous use case as I am aware of. Note we use
separate types for allocator support in this case.

On Wed, 23 Nov 2022 at 16:16, Thiago Macieira via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> On Wednesday, 23 November 2022 08:03:28 PST Yongwei Wu via Std-Discussion
> wrote:
> > We have std::default_delete in the standard library, but not
> > std::default_new. Have there been any proposals for that? If so, what
> > were the objections?
>
> What would it do?
>
> std::default_delete can be used as a deleter to std::unique_ptr and other
> smart pointer classes (and is the default). There's no such thing as an
> allocator parameter to those classes.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DCAI Cloud Engineering
>
>
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>

Received on 2022-11-23 16:26:11