{"action":"created","issue":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/5522","repository_url":"https://api.github.com/repos/RobotLocomotion/drake","labels_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/5522/labels{/name}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/5522/comments","events_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/5522/events","html_url":"https://github.com/RobotLocomotion/drake/pull/5522","id":214795213,"number":5522,"title":"Add the basis for a type-safe int for use as an identifier","user":{"login":"SeanCurtis-TRI","id":22159799,"avatar_url":"https://avatars0.githubusercontent.com/u/22159799?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanCurtis-TRI","html_url":"https://github.com/SeanCurtis-TRI","followers_url":"https://api.github.com/users/SeanCurtis-TRI/followers","following_url":"https://api.github.com/users/SeanCurtis-TRI/following{/other_user}","gists_url":"https://api.github.com/users/SeanCurtis-TRI/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanCurtis-TRI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanCurtis-TRI/subscriptions","organizations_url":"https://api.github.com/users/SeanCurtis-TRI/orgs","repos_url":"https://api.github.com/users/SeanCurtis-TRI/repos","events_url":"https://api.github.com/users/SeanCurtis-TRI/events{/privacy}","received_events_url":"https://api.github.com/users/SeanCurtis-TRI/received_events","type":"User","site_admin":false},"labels":[{"id":470891318,"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/status:%20curate%20commits%20before%20merging","name":"status: curate commits before merging","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":{"login":"sherm1","id":4088016,"avatar_url":"https://avatars2.githubusercontent.com/u/4088016?v=3","gravatar_id":"","url":"https://api.github.com/users/sherm1","html_url":"https://github.com/sherm1","followers_url":"https://api.github.com/users/sherm1/followers","following_url":"https://api.github.com/users/sherm1/following{/other_user}","gists_url":"https://api.github.com/users/sherm1/gists{/gist_id}","starred_url":"https://api.github.com/users/sherm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherm1/subscriptions","organizations_url":"https://api.github.com/users/sherm1/orgs","repos_url":"https://api.github.com/users/sherm1/repos","events_url":"https://api.github.com/users/sherm1/events{/privacy}","received_events_url":"https://api.github.com/users/sherm1/received_events","type":"User","site_admin":false},"assignees":[{"login":"sherm1","id":4088016,"avatar_url":"https://avatars2.githubusercontent.com/u/4088016?v=3","gravatar_id":"","url":"https://api.github.com/users/sherm1","html_url":"https://github.com/sherm1","followers_url":"https://api.github.com/users/sherm1/followers","following_url":"https://api.github.com/users/sherm1/following{/other_user}","gists_url":"https://api.github.com/users/sherm1/gists{/gist_id}","starred_url":"https://api.github.com/users/sherm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherm1/subscriptions","organizations_url":"https://api.github.com/users/sherm1/orgs","repos_url":"https://api.github.com/users/sherm1/repos","events_url":"https://api.github.com/users/sherm1/events{/privacy}","received_events_url":"https://api.github.com/users/sherm1/received_events","type":"User","site_admin":false},{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars1.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false}],"milestone":null,"comments":27,"created_at":"2017-03-16T18:19:37Z","updated_at":"2017-03-22T14:16:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/5522","html_url":"https://github.com/RobotLocomotion/drake/pull/5522","diff_url":"https://github.com/RobotLocomotion/drake/pull/5522.diff","patch_url":"https://github.com/RobotLocomotion/drake/pull/5522.patch"},"body":"This will serve as the basis for identifiers in `GeometryWorld`.  A simple typed int with constrained functionality.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/robotlocomotion/drake/5522)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/comments/288412034","html_url":"https://github.com/RobotLocomotion/drake/pull/5522#issuecomment-288412034","issue_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/5522","id":288412034,"user":{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars1.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false},"created_at":"2017-03-22T14:16:31Z","updated_at":"2017-03-22T14:16:31Z","body":"> Generator made thread-safe (and non-global).\n\nThread-safe, yes.  Still looks global to me.  I agreed I could live with that, so <img class=\"emoji\" title=\":lgtm:\" alt=\":lgtm:\" align=\"absmiddle\" src=\"https://reviewable.io/lgtm.png\" height=\"20\" width=\"61\"/> aside from open threads.\n\n---\n\nReviewed 3 of 8 files at r5.\nReview status: all files reviewed at latest revision, 11 unresolved discussions.\n\n---\n\n*[drake/common/type_safe_index.h, line 42 at r5](https://reviewable.io:443/reviews/robotlocomotion/drake/5522#-KfqHyJuCRbmvEqfH-EA:-KfqHyJuCRbmvEqfH-EB:b-5jlazy) ([raw file](https://github.com/robotlocomotion/drake/blob/2f524ea29ec38678026237618baff79aa036a950/drake/common/type_safe_index.h#L42)):*\n> ```objc\n> ///   - In general, indices of different types are _not_ interconvertible.\n> ///\n> /// There is no such thing as an \"invalid\" identifier; there is no sentinel\n> ```\n\ns/identifier/index?\n\n---\n\n*[drake/geometry/test/CMakeLists.txt, line 1 at r5](https://reviewable.io:443/reviews/robotlocomotion/drake/5522#-KfqKW5uA-bxtgd5u7U3:-KfqKW5uA-bxtgd5u7U4:bupxxm5) ([raw file](https://github.com/robotlocomotion/drake/blob/2f524ea29ec38678026237618baff79aa036a950/drake/geometry/test/CMakeLists.txt#L1)):*\n> ```CMake\n> # Build tests for geometry\n> ```\n\nBTW do you anticipate having CMake users?  Bummer.\n\n---\n\n*[drake/geometry/test/identifier_test.cc, line 11 at r5](https://reviewable.io:443/reviews/robotlocomotion/drake/5522#-KfqK_Ryd1SIDdC51cZi:-KfqK_Ryd1SIDdC51cZj:babqlcd) ([raw file](https://github.com/robotlocomotion/drake/blob/2f524ea29ec38678026237618baff79aa036a950/drake/geometry/test/identifier_test.cc#L11)):*\n> ```cpp\n> namespace drake {\n> namespace geometry {\n> namespace  {\n> ```\n\nBTW extra whitespace\n\n---\n\n*[drake/geometry/test/identifier_test.cc, line 20 at r5](https://reviewable.io:443/reviews/robotlocomotion/drake/5522#-KfqL2fxBe82bFLBZwte:-KfqL2fxBe82bFLBZwtf:bf3bmpy) ([raw file](https://github.com/robotlocomotion/drake/blob/2f524ea29ec38678026237618baff79aa036a950/drake/geometry/test/identifier_test.cc#L20)):*\n> ```cpp\n> using BId = Identifier<class BTag>;\n> \n> // The nature of gtest means these tests can be instantiated in any order.\n> ```\n\nGlobal data - so many downsides.  Would https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#sharing-resources-between-tests-in-the-same-test-case solve this particular problem for you?\n\n---\n\n*[drake/geometry/test/identifier_test.cc, line 164 at r5](https://reviewable.io:443/reviews/robotlocomotion/drake/5522#-KfqMPpxkMXeMohqY0jA:-KfqMPpxkMXeMohqY0jB:blvkr59) ([raw file](https://github.com/robotlocomotion/drake/blob/2f524ea29ec38678026237618baff79aa036a950/drake/geometry/test/identifier_test.cc#L164)):*\n> ```cpp\n>   // This only tests another id type and some reasonable int tests. This assumes\n>   // no one will attempt to cast to anything more exotic.\n>   EXPECT_FALSE((can_cast<AId, BId>()));\n> ```\n\nCould these just be `static_assert<std::is_convertible<foo, bar>::value>`?\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/robotlocomotion/drake/5522#-:-KfqIyHCaxd-NRkJ-1C7:brmgj2s)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"david-german-tri"}}