A question about postblit constructor

Ferhat Kurtulmuş aferust at gmail.com
Tue Nov 5 10:32:03 UTC 2019


On Tuesday, 5 November 2019 at 10:31:05 UTC, Ferhat Kurtulmuş 
wrote:
> On Tuesday, 5 November 2019 at 10:13:59 UTC, Mike Parker wrote:
>> [...]
>
> Yep, it is obvious that my code is wrong. s1 and s2 point to 
> the same memory address. I could obtain my desired behavior 
> with copy constructor. The documentation also say "WARNING: The 
> postblit is considered legacy and is not recommended for new 
> code. Code should use copy constructors defined in the previous 
> section".
>
> [...]

edit: they should be s1.vals and s2.vals


More information about the Digitalmars-d-learn mailing list