{"action":"created","issue":{"url":"https://api.github.com/repos/ros/class_loader/issues/38","repository_url":"https://api.github.com/repos/ros/class_loader","labels_url":"https://api.github.com/repos/ros/class_loader/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/ros/class_loader/issues/38/comments","events_url":"https://api.github.com/repos/ros/class_loader/issues/38/events","html_url":"https://github.com/ros/class_loader/pull/38","id":176233238,"number":38,"title":"Add ClassLoader::createUniqueInstance","user":{"login":"de-vri-es","id":786213,"avatar_url":"https://avatars.githubusercontent.com/u/786213?v=3","gravatar_id":"","url":"https://api.github.com/users/de-vri-es","html_url":"https://github.com/de-vri-es","followers_url":"https://api.github.com/users/de-vri-es/followers","following_url":"https://api.github.com/users/de-vri-es/following{/other_user}","gists_url":"https://api.github.com/users/de-vri-es/gists{/gist_id}","starred_url":"https://api.github.com/users/de-vri-es/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/de-vri-es/subscriptions","organizations_url":"https://api.github.com/users/de-vri-es/orgs","repos_url":"https://api.github.com/users/de-vri-es/repos","events_url":"https://api.github.com/users/de-vri-es/events{/privacy}","received_events_url":"https://api.github.com/users/de-vri-es/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-09-11T09:04:00Z","updated_at":"2016-09-19T17:22:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros/class_loader/pulls/38","html_url":"https://github.com/ros/class_loader/pull/38","diff_url":"https://github.com/ros/class_loader/pull/38.diff","patch_url":"https://github.com/ros/class_loader/pull/38.patch"},"body":"This PR adds a function to create managed instances wrapped in a `std::unique_ptr`.\r\n\r\nThere are a number of advantages to `unique_ptr`:\r\n* It accurately models the fact that you are the sole owner when you create the instance.\r\n* It can be **implicitly** converted to `std::shared_ptr` and `boost::shared_ptr` (since boost 1.53).\r\n* It can release the held pointer to be used in whichever ownership or lifetime management system the user wants.\r\n\r\nThe header hides the `#include <memory>` and the extra function if C++11 support is not available. That means dependent projects are not forced to enable C++11 support. Since the added function is actually a function template, there isn't even a need to enable C++11 support for compiling `ClassLoader`. As such it is even safe to merge this into indigo.\r\n\r\nSince `std::unique_ptr` is implicitly convertible to `boost::shared_ptr` I was also contemplating just changing the return type of `ClassLoader::createInstance`. It would be *mostly* API compatible. However, it would not ABI compatible and there are cases where it would not be API backwards compatible either (if someone is using an implicit conversion on the returned `boost::shared_ptr` that is not available for `std::unique_ptr`, for example). Doing this may make sense in the future, but for now this seemed the most pragmatic approach."},"comment":{"url":"https://api.github.com/repos/ros/class_loader/issues/comments/248059258","html_url":"https://github.com/ros/class_loader/pull/38#issuecomment-248059258","issue_url":"https://api.github.com/repos/ros/class_loader/issues/38","id":248059258,"user":{"login":"mikaelarguedas","id":6644208,"avatar_url":"https://avatars.githubusercontent.com/u/6644208?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaelarguedas","html_url":"https://github.com/mikaelarguedas","followers_url":"https://api.github.com/users/mikaelarguedas/followers","following_url":"https://api.github.com/users/mikaelarguedas/following{/other_user}","gists_url":"https://api.github.com/users/mikaelarguedas/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelarguedas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelarguedas/subscriptions","organizations_url":"https://api.github.com/users/mikaelarguedas/orgs","repos_url":"https://api.github.com/users/mikaelarguedas/repos","events_url":"https://api.github.com/users/mikaelarguedas/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelarguedas/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T17:22:00Z","updated_at":"2016-09-19T17:22:00Z","body":"Thanks @de-vri-es for adding the unit test and cleaning up branching.\r\n@davetcoleman I'll perform some more testing before +1ing this, ths buildfarm is currently rebuilding all kinetic so this will be available for the next sync after the current one, certainly a couple of weeks from now."}}
{"actor":{"display_login":"mikaelarguedas"}}