Copy Constructor

Ali Çehreli acehreli at yahoo.com
Sun Jun 5 22:00:42 UTC 2022


On 6/5/22 14:39, Ali Çehreli wrote:

 > Actually, both are copy construction:

I am wrong there. I did confuse myself.

 >    Foo one = Foo(1), two = 2;

As my rewrite shows, they are both construction with an int:

 >    auto one = Foo(1);
 >    auto two = Foo(2);

Ali



More information about the Digitalmars-d-learn mailing list