DIP 1018--The Copy Constructor--Formal Review
Olivier FAURE
couteaubleu at gmail.com
Mon Feb 25 23:05:20 UTC 2019
On Monday, 25 February 2019 at 22:45:38 UTC, Olivier FAURE wrote:
> For the same reason C++'s std::shared_pointer uses a non-const
> copy constructor.
Wait, no, I just checked, std::shared_pointer's copy constructor
is const, even though it changes shared data. Ugh, that's just
wrong.
(I kind of agree with Walter's point; I totally assumed the
constructor would be non-const, since it mutates data it receives)
More information about the Digitalmars-d-announce
mailing list