lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Reference member = shared_ptr


From: Greg Chicares
Subject: Re: [lmi] Reference member = shared_ptr
Date: Sat, 6 Feb 2021 00:03:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 2/5/21 5:01 PM, Greg Chicares wrote:
> On 2/4/21 4:49 PM, Vadim Zeitlin wrote:
[...]
>> It is
>> perfectly possible to declare unique_ptr<> with incomplete classes, you
>> just need to take care to avoid _using_ it before including the complete
>> class declaration. And "using" here means both using it in your own code
>> and in the compiler-generated special functions. So you could have kept the
>> forward declarations unchanged and just would need to explicitly define
>> BasicValues move ctor and assignment operator and dtor as "= default" in
>> basicvalues.cpp file, where the full declarations of everything are
>> available.
> 
> That sounds like it would be easy enough.

Done: new branch odd/unique_vs_shared2 . Would you recommend
merging that into master?

BTW, I defined the BasicValues dtor outside of the header, but
it seems I didn't need to touch the move ctor or operator=().
Perhaps those aren't used--I don't know.


reply via email to

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