C++ Logo


Advanced search

Re: [std-proposals] New type 'dvoid' -- a pointer to a destructible object

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 23 Aug 2022 14:22:54 -0300
On Tuesday, 23 August 2022 08:28:33 -03 Frederick Virchanza Gotham via Std-
Proposals wrote:
> In order to implement the 'dvoid*' type on a system where a pointer is
> 8 bytes, the 'dvoid' type could be 16 bytes, as internally it would be
> two pointers:
> (1) The pointer to the object
> (2) The pointer to the destructor of the object (possibly obtained
> from the v-table)
 or a pointer to a template type-erasing function that simply does call the

This doesn't need to be a core language change. It can be simply a library

And if so, it may not need to be in the Standard Library in the first place.
Can you prototype it?

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2022-08-23 17:22:57