Why compiler provides default copy constructor

后端 未结 10 1931
别那么骄傲
别那么骄傲 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 18:00

    If you have a struct being used by C code, a default copy constructor needs to be there to preserve C struct copying semantics.

提交回复
热议问题