Code: ---- @property bool empty(T)(in T[] a) @safe pure nothrow { return !a.length; } void main() { alias int[] Range; static if (is(char[1 + Range.empty])) // Line 9 enum bool isInfinite = true; char[0] s; // need } Output: ---- test.d(9): Error: Integer constant expression expected instead of cast(uint)(1 + cast(int)empty((__error)))
Original code: ---- import std.range; void main() { pragma(msg, isInfinite!(int[])); char[0] s; // need }
https://github.com/D-Programming-Language/dmd/pull/482 And change importance: normal -> major In my opinion, this issue is important, because std.range.isInfinite is used frequently.
https://github.com/D-Programming-Language/dmd/commit/de0368bdad0df70122a055284ddc55fbf22f4be7 https://github.com/D-Programming-Language/dmd/commit/02dff8cf67356ca36cbb363c36665073a96e2099
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル