Why compiler provides default copy constructor

后端 未结 10 1942
别那么骄傲
别那么骄傲 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:45

    Saving you time? If you have a simple class (ie if you can easily copy construct all its elements) you then don't need to write one.

提交回复
热议问题