{"action":"created","issue":{"url":"https://api.github.com/repos/netheril96/StaticJSON/issues/21","repository_url":"https://api.github.com/repos/netheril96/StaticJSON","labels_url":"https://api.github.com/repos/netheril96/StaticJSON/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/netheril96/StaticJSON/issues/21/comments","events_url":"https://api.github.com/repos/netheril96/StaticJSON/issues/21/events","html_url":"https://github.com/netheril96/StaticJSON/pull/21","id":190881648,"number":21,"title":"Reduced code duplication in IntegerHandler","user":{"login":"Lucretiel","id":1823405,"avatar_url":"https://avatars.githubusercontent.com/u/1823405?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucretiel","html_url":"https://github.com/Lucretiel","followers_url":"https://api.github.com/users/Lucretiel/followers","following_url":"https://api.github.com/users/Lucretiel/following{/other_user}","gists_url":"https://api.github.com/users/Lucretiel/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucretiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucretiel/subscriptions","organizations_url":"https://api.github.com/users/Lucretiel/orgs","repos_url":"https://api.github.com/users/Lucretiel/repos","events_url":"https://api.github.com/users/Lucretiel/events{/privacy}","received_events_url":"https://api.github.com/users/Lucretiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-22T01:13:20Z","updated_at":"2016-11-22T05:23:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/netheril96/StaticJSON/pulls/21","html_url":"https://github.com/netheril96/StaticJSON/pull/21","diff_url":"https://github.com/netheril96/StaticJSON/pull/21.diff","patch_url":"https://github.com/netheril96/StaticJSON/pull/21.patch"},"body":"Note that if you wanted to go REALLY crazy with code deduplication you could do something like this:\r\n\r\n    #define RECEIVE_NUM(METHOD, TYPE) \\\r\n        bool METHOD ( TYPE i ) override { return receive(i, #TYPE ); }\r\n\r\n    ...\r\n\r\n    RECEIVE_NUM(Int, int)\r\n    RECEIVE_NUM(Uint, unsigned int)\r\n    RECEIVE_NUM(Int64, std::int64_t)\r\n    RECEIVE_NUM(Uint64, std::uint64_t)\r\n\r\nBut that's something that only crazy people like me like doing, so I didn't use it in this PR."},"comment":{"url":"https://api.github.com/repos/netheril96/StaticJSON/issues/comments/262150659","html_url":"https://github.com/netheril96/StaticJSON/pull/21#issuecomment-262150659","issue_url":"https://api.github.com/repos/netheril96/StaticJSON/issues/21","id":262150659,"user":{"login":"Lucretiel","id":1823405,"avatar_url":"https://avatars.githubusercontent.com/u/1823405?v=3","gravatar_id":"","url":"https://api.github.com/users/Lucretiel","html_url":"https://github.com/Lucretiel","followers_url":"https://api.github.com/users/Lucretiel/followers","following_url":"https://api.github.com/users/Lucretiel/following{/other_user}","gists_url":"https://api.github.com/users/Lucretiel/gists{/gist_id}","starred_url":"https://api.github.com/users/Lucretiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lucretiel/subscriptions","organizations_url":"https://api.github.com/users/Lucretiel/orgs","repos_url":"https://api.github.com/users/Lucretiel/repos","events_url":"https://api.github.com/users/Lucretiel/events{/privacy}","received_events_url":"https://api.github.com/users/Lucretiel/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T05:23:18Z","updated_at":"2016-11-22T05:23:18Z","body":"This PR now also includes a nifty compile-time optimization in the `IntegerHandler`s, which makes them do bounds-checking at compile time when possible. A future pull request will probably try to unify the shared code between the `IntegerHandler` and the floating point handlers, since we can use `std::enable_if` to enable different kinds of bounds checking on different types."}}
{"actor":{"display_login":"Lucretiel"}}