At 2007年04月09日 I have downloaded the DMD package from the digitalmars web-page. I tried to code a veb-tree with template metaprogramming and ended up with the above-mentioned error. The command-line was /opt/dmd/bin/dmd -c vebtree.d The complete code can be found at the above URL.
(In reply to comment #0) > > The complete code can be found at the above URL. > Ah, the URL: http://www.core-dump.com.hr/vebtree.d
Reduced version: import std.intrinsic; private class Node(uint level, uint nlog) { Node!(level-1, nlog/2) bottom; } private class Node(uint level : 0, uint nlog : 5) { uint leaf; uint min() { return leaf == 0 ? 0 : bsf(leaf); } } alias Node!(2, 20) tree;
(In reply to comment #2) Hehe, I created a bit more reduced version on #d today, but forgot to post it here. Here it is: import std.intrinsic; class Node(int l) { Node!(l-1) b; } class Node(int l : 0) { uint leaf = 0; int m() { return leaf ? 0 : bsf(leaf); } } alias Node!(1) tree;
Fixed DMD 1.013
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル