Deletion of copy-ctor & copy-assignment - public, private or protected?
问题 In order to make an object non-copiable we can explicitly delete both its copy-constructor and copy-assignment operator. My question is: What is the right place to do it - in the public , private or protected section of the class? And - does this choice make any difference? 回答1: what is the right place to do it - in the public, private or protected section of the class? I would put them in the public section . This is because deleting a constructor or an assignment operator is orthogonal to