Note the missing exclamation marks in Pred(A, B[0]) || ... The compiler dies with "Segmantation fault". import std.typetuple; import std.stdio; template Pred(A, B) { static if(is(B == int)) enum bool Pred = true; else enum bool Pred = false; } template PredAny(A, B...) { static if(B.length == 0) enum bool PredAny = false; else enum bool PredAny = Pred(A, B[0]) || PredAny(A, B[1..$]); } void main() { pragma(msg, PredAny!(int, long, ulong, int, size_t, double, float)); };
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5783cf136f0cbee2931dfb6b2e8fa47009364090 fix Issue 6968 - Segmantation fault, if exclamation mark absent
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d1b420de149494519ab6936c5387e3f326b2265a fix Issue 6968 - Segmantation fault, if exclamation mark absent
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル