Why compiler provides default copy constructor

后端 未结 10 1899
别那么骄傲
别那么骄傲 2020-12-16 17:08

I wanted to know Why compiler provides default copy constructor..Whats the strategy behind that idea.

Thanks in Advance.

10条回答
  •  一生所求
    2020-12-16 17:50

    Because otherwise, when you pass an instance by value, how could the compiler generate one?

提交回复
热议问题