{"action":"opened","issue":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/15423","repository_url":"https://api.github.com/repos/mantidproject/mantid","labels_url":"https://api.github.com/repos/mantidproject/mantid/issues/15423/labels{/name}","comments_url":"https://api.github.com/repos/mantidproject/mantid/issues/15423/comments","events_url":"https://api.github.com/repos/mantidproject/mantid/issues/15423/events","html_url":"https://github.com/mantidproject/mantid/issues/15423","id":135826320,"number":15423,"title":"If there is a clone method, make the copy constructor private.","user":{"login":"quantumsteve","id":5920552,"avatar_url":"https://avatars.githubusercontent.com/u/5920552?v=3","gravatar_id":"","url":"https://api.github.com/users/quantumsteve","html_url":"https://github.com/quantumsteve","followers_url":"https://api.github.com/users/quantumsteve/followers","following_url":"https://api.github.com/users/quantumsteve/following{/other_user}","gists_url":"https://api.github.com/users/quantumsteve/gists{/gist_id}","starred_url":"https://api.github.com/users/quantumsteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantumsteve/subscriptions","organizations_url":"https://api.github.com/users/quantumsteve/orgs","repos_url":"https://api.github.com/users/quantumsteve/repos","events_url":"https://api.github.com/users/quantumsteve/events{/privacy}","received_events_url":"https://api.github.com/users/quantumsteve/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mantidproject/mantid/labels/Component:%20Framework","name":"Component: Framework","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mantidproject/mantid/milestones/5","html_url":"https://github.com/mantidproject/mantid/milestones/Release%203.7","labels_url":"https://api.github.com/repos/mantidproject/mantid/milestones/5/labels","id":1106939,"number":5,"title":"Release 3.7","description":"","creator":{"login":"peterfpeterson","id":404003,"avatar_url":"https://avatars.githubusercontent.com/u/404003?v=3","gravatar_id":"","url":"https://api.github.com/users/peterfpeterson","html_url":"https://github.com/peterfpeterson","followers_url":"https://api.github.com/users/peterfpeterson/followers","following_url":"https://api.github.com/users/peterfpeterson/following{/other_user}","gists_url":"https://api.github.com/users/peterfpeterson/gists{/gist_id}","starred_url":"https://api.github.com/users/peterfpeterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterfpeterson/subscriptions","organizations_url":"https://api.github.com/users/peterfpeterson/orgs","repos_url":"https://api.github.com/users/peterfpeterson/repos","events_url":"https://api.github.com/users/peterfpeterson/events{/privacy}","received_events_url":"https://api.github.com/users/peterfpeterson/received_events","type":"User","site_admin":false},"open_issues":547,"closed_issues":185,"state":"open","created_at":"2015-05-12T15:38:13Z","updated_at":"2016-02-23T18:45:49Z","due_on":"2016-06-05T23:00:00Z","closed_at":null},"comments":0,"created_at":"2016-02-23T18:45:48Z","updated_at":"2016-02-23T18:45:48Z","closed_at":null,"body":"From PR #15327.\r\n@SimonHeybrock's comments:\r\n\r\n---\r\n\r\nThere are a few classes like PeakTranformQSample that have a clone method. You deleted the public copy/assignment (ok), but I guess it might make more sense to have them private (i.e., that was a problem in the existing implementation)?\r\n\r\n---\r\n\r\nThere are 98 files in the repository matching ` clone()`, though I think this has already been done for many of them. We need to decide how to handle clone() methods using `boost::make_shared<T>`, which requires the copy constructor of class T. \r\n\r\n[One possible solution](http://stackoverflow.com/questions/3378520/how-to-make-boostmake-shared-a-friend-of-my-class) is to make `boost::make_shared<T>(cont T&)` a friend of T. For example, in AlgorithmHasProperty.h, we would add something like\r\n```\r\npublic:\r\n  AlgorithmHasProperty(AlgorithmHasProperty &&) = default;\r\n  AlgorithmHasProperty &operator=(const AlgorithmHasProperty &) = delete;\r\n  AlgorithmHasProperty &operator=(AlgorithmHasProperty &&) = default;\r\n  friend boost::shared_ptr<AlgorithmHasProperty> boost::make_shared<AlgorithmHasProperty>(const AlgorithmHasProperty&);\r\nprivate:\r\n  AlgorithmHasProperty &operator=(const AlgorithmHasProperty &) = default;\r\n```\r\n\r\n\r\n"}}