{"action":"created","issue":{"url":"https://api.github.com/repos/dascandy/hippomocks/issues/37","labels_url":"https://api.github.com/repos/dascandy/hippomocks/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/dascandy/hippomocks/issues/37/comments","events_url":"https://api.github.com/repos/dascandy/hippomocks/issues/37/events","html_url":"https://github.com/dascandy/hippomocks/pull/37","id":96299113,"number":37,"title":"Dkgs return const ref","user":{"login":"dkgs","id":13416648,"avatar_url":"https://avatars.githubusercontent.com/u/13416648?v=3","gravatar_id":"","url":"https://api.github.com/users/dkgs","html_url":"https://github.com/dkgs","followers_url":"https://api.github.com/users/dkgs/followers","following_url":"https://api.github.com/users/dkgs/following{/other_user}","gists_url":"https://api.github.com/users/dkgs/gists{/gist_id}","starred_url":"https://api.github.com/users/dkgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkgs/subscriptions","organizations_url":"https://api.github.com/users/dkgs/orgs","repos_url":"https://api.github.com/users/dkgs/repos","events_url":"https://api.github.com/users/dkgs/events{/privacy}","received_events_url":"https://api.github.com/users/dkgs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-21T11:59:13Z","updated_at":"2015-07-22T11:07:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dascandy/hippomocks/pulls/37","html_url":"https://github.com/dascandy/hippomocks/pull/37","diff_url":"https://github.com/dascandy/hippomocks/pull/37.diff","patch_url":"https://github.com/dascandy/hippomocks/pull/37.patch"},"body":"I propose the following modifications tu support return const ref values.\r\n\r\nAt first, I did the modification bu overloading the return function the following way : \r\n```c++\r\ntemplate <typename T>\r\nclass AsRef\r\n{\r\n    AsRef(T & value) : _v(value) {}\r\n    operator T& () { return _v; }\r\n    T & _v;\r\n}:\r\n...\r\nCall &Return(AsRef<Y> obj)\r\n```\r\nBut It was fastidious to use : \r\n```c++\r\nInterfaceReturned * ir = mocks.Mock<InterfaceReturned>();\r\nmocks.OnCall(myMock, Interface::myFunction).Return(AsRef<const InterfaceReturned &>(*ir));\r\n```\r\nThen I prefered adding a new Return function named ReturnByRef() it is more explicit to me.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dascandy/hippomocks/issues/comments/123668424","html_url":"https://github.com/dascandy/hippomocks/pull/37#issuecomment-123668424","issue_url":"https://api.github.com/repos/dascandy/hippomocks/issues/37","id":123668424,"user":{"login":"dascandy","id":1306517,"avatar_url":"https://avatars.githubusercontent.com/u/1306517?v=3","gravatar_id":"","url":"https://api.github.com/users/dascandy","html_url":"https://github.com/dascandy","followers_url":"https://api.github.com/users/dascandy/followers","following_url":"https://api.github.com/users/dascandy/following{/other_user}","gists_url":"https://api.github.com/users/dascandy/gists{/gist_id}","starred_url":"https://api.github.com/users/dascandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dascandy/subscriptions","organizations_url":"https://api.github.com/users/dascandy/orgs","repos_url":"https://api.github.com/users/dascandy/repos","events_url":"https://api.github.com/users/dascandy/events{/privacy}","received_events_url":"https://api.github.com/users/dascandy/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T11:07:21Z","updated_at":"2015-07-22T11:07:21Z","body":"Looks like it does not build. Can you check what's up with that?"}}