lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master ad8e4f7 3/3: Rework 7702 calculations


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master ad8e4f7 3/3: Rework 7702 calculations
Date: Sat, 22 May 2021 22:08:35 +0200

On Sat, 22 May 2021 13:57:06 -0400 (EDT) Greg Chicares 
<gchicares@sbcglobal.net> wrote:

GC> branch: master
GC> commit ad8e4f74085a2697b0838df8581ab5fa2a9082ea
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> 
GC>     Rework 7702 calculations
GC>     
GC>     Chose to hold a gpt7702 object in a std::shared_ptr rather than in a
GC>     std::unique_ptr: it's notionally unique, but std::unique_ptr requires
GC>     an explicit dtor, which isn't a good enough reason to write one.

 I wonder if this could be a good reason to add some impl_ptr<> class that
would allow defining a unique owning pointer even to an object of an
incomplete type, using the same technique as shared_ptr<> uses (i.e.
storing a type-erased deleter), but without actually allowing sharing.

 For me personally defining the dtor explicitly doesn't seem to be a big
(or even noticeable) price to pay for just using unique_ptr<>, but if it's
really so problematic, using a dedicated class would seem to be much better
than allowing sharing the ownership of an object which is not supposed to
be shared.

 Please let me know if you think it would be worth pursuing this further,
VZ

Attachment: pgp72FvHRd6K9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]