{"action":"created","issue":{"url":"https://api.github.com/repos/Syniurge/Calypso/issues/47","repository_url":"https://api.github.com/repos/Syniurge/Calypso","labels_url":"https://api.github.com/repos/Syniurge/Calypso/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/Syniurge/Calypso/issues/47/comments","events_url":"https://api.github.com/repos/Syniurge/Calypso/issues/47/events","html_url":"https://github.com/Syniurge/Calypso/issues/47","id":176228105,"number":47,"title":"Changes after C++11 fixes Sept 2016","user":{"login":"wilsonk","id":38802,"avatar_url":"https://avatars.githubusercontent.com/u/38802?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonk","html_url":"https://github.com/wilsonk","followers_url":"https://api.github.com/users/wilsonk/followers","following_url":"https://api.github.com/users/wilsonk/following{/other_user}","gists_url":"https://api.github.com/users/wilsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonk/subscriptions","organizations_url":"https://api.github.com/users/wilsonk/orgs","repos_url":"https://api.github.com/users/wilsonk/repos","events_url":"https://api.github.com/users/wilsonk/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-11T07:41:18Z","updated_at":"2016-10-11T21:20:54Z","closed_at":null,"body":"Here is a diff of a few of the comments that can be removed/changed in the libstdc++ examples since the C++11 fixes (I will try to flesh out some better example code and finish array.d, etc. soon) :\r\n\r\n```\r\ndiff --git a/tests/calypso/libstdc++/bitset/bitset.d b/tests/calypso/libstdc++/bitset/bitset.d\r\nindex 4dc4aec..0336b05 100644\r\n--- a/tests/calypso/libstdc++/bitset/bitset.d\r\n+++ b/tests/calypso/libstdc++/bitset/bitset.d\r\n@@ -53,14 +53,12 @@ void main()\r\n     }\r\n     write('\\n');\r\n     writeln(\"b as ulong = \\t \", b.to_ulong); // '13' is correct\r\n+    writeln(\"b = \\t\\t\", b);\r\n \r\n // FAILURE seems like a template argument error due to enum\r\n //    writeln(\"A bit is still = \", usedColors[A]);  // false\r\n \r\n-// FAILURE in phobos format.d\r\n-//    writeln(b);\r\n-\r\n-// FAILURE on operators again\r\n+// FAILURE on operators\r\n //    auto d = a&b;\r\n \r\n }\r\n\\ No newline at end of file\r\ndiff --git a/tests/calypso/libstdc++/deque/deque.d b/tests/calypso/libstdc++/deque/deque.d\r\nindex 28c26d7..0b62e2a 100644\r\n--- a/tests/calypso/libstdc++/deque/deque.d\r\n+++ b/tests/calypso/libstdc++/deque/deque.d\r\n@@ -84,24 +84,21 @@ void main()\r\n     dq.assign(10,5);\r\n     auto it = new deque!(int).iterator;\r\n \r\n-    // FAILURES\r\n+    auto second = new deque!(int)(4, 100);\r\n \r\n-    // Assertion `int_regs + sse_regs <= 2' failed !?!?!?\r\n-    //it = dq5.begin();\r\n-    // Idiomatic C++ iterator usage doesn't work yet. See list.d also\r\n-    //for (int i=0; i < dq.size(); it++, i++)\r\n-      //writeln(*it);\r\n+    *it = dq5.begin();\r\n+    for (int i=0; i < dq.size(); it++, i++)\r\n+      writeln(*it);\r\n \r\n+    // FAILURES\r\n     // 'no property popFront' here\r\n     //foreach(deq; dq3) {}\r\n \r\n-    //auto second = new deque!(int)(4, 100);\r\n-\r\n     // Doesn't seem to be picking up all template decls\r\n     //immutable int xx = 9;\r\n     //immutable float yy = 8.1;\r\n-    //auto dq5 = new deque!(xx, yy);\r\n+    //auto dq6 = new deque!(xx, yy);\r\n \r\n     // deque iterators need to work for this to work\r\n-    // dq.insert(it, 2, 20);\r\n+    // dq.insert(*it, 2, 20);\r\n }\r\n\\ No newline at end of file\r\ndiff --git a/tests/calypso/libstdc++/map/map.d b/tests/calypso/libstdc++/map/map.d\r\nindex 00c9b62..770792f 100644\r\n--- a/tests/calypso/libstdc++/map/map.d\r\n+++ b/tests/calypso/libstdc++/map/map.d\r\n@@ -18,7 +18,7 @@ void main()\r\n \r\n     immutable char a = '0';\r\n     immutable char b = 'z';\r\n-    m[a] = /+cppstring(+/\"Sedna\"/+)+/; // FIXME copy ctor instead of memcpy\r\n+    m[a] = cppstring(\"Sedna\");\r\n     m[b] = \"90377\";\r\n \r\n     writeln(m[b].c_str.to!string, \" \", m[a].c_str.to!string);\r\ndiff --git a/tests/calypso/libstdc++/set/set.d b/tests/calypso/libstdc++/set/set.d\r\nindex 90a0440..a79f65f 100644\r\n--- a/tests/calypso/libstdc++/set/set.d\r\n+++ b/tests/calypso/libstdc++/set/set.d\r\n@@ -17,15 +17,14 @@ void main()\r\n     auto ms1 = new multiset!int;\r\n     auto ms2 = new multiset!int;\r\n \r\n-    multiset!(int).iterator it;\r\n+    multiset!(int).iterator it = ms1.begin();\r\n \r\n     int[] ints = [1,9,55,77,99,33];\r\n \r\n-    //auto ms3 = new multiset!(int)(ints, ints.ptr+3);  // Unhandled D->Clang conversion\r\n-    //auto ms3 = new multiset!(int)(ints, ints.ptr+3);  // non-canonical or dependent type in IR\r\n+    auto ms3 = new multiset!(int)(ints, ints.ptr+3); //None of the overloads of '__ctor' are cal\r\n \r\n     const int x = 7;\r\n-    //ms21.insert(it, x);    // doesn't work, assert in dmd\r\n+    ms1.insert(it, x);\r\n \r\n     for (int i = 0; i < 5; i++)\r\n         ms1.insert(i);\r\ndiff --git a/tests/calypso/libstdc++/vector/vector.d b/tests/calypso/libstdc++/vector/vector.d\r\nindex 00bf271..a3de4f5 100644\r\n--- a/tests/calypso/libstdc++/vector/vector.d\r\n+++ b/tests/calypso/libstdc++/vector/vector.d\r\n@@ -53,11 +53,8 @@ void main()\r\n         write(*it);\r\n     writeln(*it);\r\n \r\n-    // FAILURE\r\n-    // classes.cpp:256: DValue* DtoCastClass(Loc&, DValue*, Type*):\r\n-    // Assertion `to->ty == Tclass' failed.\r\n-    //const char x = '5';\r\n-    //write(\"inserting character into first vector: \");\r\n-    //it = v.begin();\r\n-    //v.insert(it, x);\r\n+    const char x = '5';\r\n+    write(\"inserting character into first vector: \\n\");\r\n+    it = v.begin();\r\n+    v.insert(it, x);\r\n```"},"comment":{"url":"https://api.github.com/repos/Syniurge/Calypso/issues/comments/253050165","html_url":"https://github.com/Syniurge/Calypso/issues/47#issuecomment-253050165","issue_url":"https://api.github.com/repos/Syniurge/Calypso/issues/47","id":253050165,"user":{"login":"Syniurge","id":4272771,"avatar_url":"https://avatars.githubusercontent.com/u/4272771?v=3","gravatar_id":"","url":"https://api.github.com/users/Syniurge","html_url":"https://github.com/Syniurge","followers_url":"https://api.github.com/users/Syniurge/followers","following_url":"https://api.github.com/users/Syniurge/following{/other_user}","gists_url":"https://api.github.com/users/Syniurge/gists{/gist_id}","starred_url":"https://api.github.com/users/Syniurge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Syniurge/subscriptions","organizations_url":"https://api.github.com/users/Syniurge/orgs","repos_url":"https://api.github.com/users/Syniurge/repos","events_url":"https://api.github.com/users/Syniurge/events{/privacy}","received_events_url":"https://api.github.com/users/Syniurge/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T21:20:54Z","updated_at":"2016-10-11T21:20:54Z","body":"Hey Kelly,\r\n\r\n`v.insert(it, x)` is now working with C++11 enabled, thanks to b1f7192a06d5eee3c4cecef0668be414e332227e\r\n\r\nRelying on DMD's template argument deduction was a blocker anyway, in many cases it's not sophisticated enough, so I switched to Clang's template argument deduction completely (even for function template calls), with nice results and no drawbacks for now.\r\n\r\nAlso FYI Calypso's performance and memory usage have been vastly improved lately."}}
{"actor":{"display_login":"Syniurge"}}