GitHub PullRequestReviewCommentEvent at 2014-04-08 10:05:49
Repository: phobos
Actor: monarchdodra
Payload: {"comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/11383486","id":11383486,"diff_hunk":"@@ -75,14 +75,25 @@ import std.c.string, std.conv, std.exception, std.traits, std.typecons,\n   +/\n template maxSize(T...)\n {\n+    // Avoid circular initialization of maxSize by using Object's size for\n+    // all classes\n+    static if(is(T[0] == class))\n+    {\n+        enum size_t tsize = Object.init.sizeof;","path":"std/variant.d","position":8,"original_position":8,"commit_id":"c0b17ee718d7051f04e9791ac3dbcc07aab24385","original_commit_id":"c0b17ee718d7051f04e9791ac3dbcc07aab24385","user":{"login":"monarchdodra","id":1911406,"avatar_url":"https://avatars.githubusercontent.com/u/1911406?","gravatar_id":"a6db4d98f31c0b88734d406fcdfe98bc","url":"https://api.github.com/users/monarchdodra","html_url":"https://github.com/monarchdodra","followers_url":"https://api.github.com/users/monarchdodra/followers","following_url":"https://api.github.com/users/monarchdodra/following{/other_user}","gists_url":"https://api.github.com/users/monarchdodra/gists{/gist_id}","starred_url":"https://api.github.com/users/monarchdodra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monarchdodra/subscriptions","organizations_url":"https://api.github.com/users/monarchdodra/orgs","repos_url":"https://api.github.com/users/monarchdodra/repos","events_url":"https://api.github.com/users/monarchdodra/events{/privacy}","received_events_url":"https://api.github.com/users/monarchdodra/received_events","type":"User","site_admin":false},"body":"> AFAIK both will always return  (void*).sizeof  (size of a reference), so I don't suppose the code actually meant to use instanceSizeOf?\r\n\r\nThis is just a workaround for https://d.puremagic.com/issues/show_bug.cgi?id=12543 . The issue, basically, is getting `maxSize` to work if `T[0]` is actually a forward declared class.\r\n\r\nSpeaking of which, Kenji is already on it, so this workaround will probably end up un-needed anyways. We'll just keep the unittest I guess.","created_at":"2014-04-08T10:05:49Z","updated_at":"2014-04-08T10:05:49Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/2074#discussion_r11383486","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2074","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/11383486"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2074#discussion_r11383486"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2074"}}}}