Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why doesn Chic add a copy constructor and an assignment operator to my class?

0
Posted

Why doesn Chic add a copy constructor and an assignment operator to my class?

0

A C++ compiler generates a copy constructor and an assignment operator only if they’re actually called. It’s legal and common to have a class that cannot be copy constructed or assigned as long as you don’t try to perform any of these operations. As Chic cannot know whether or not you’re going to copy construct or assign your class, it takes a conservative approach and assumes you will not do either.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123