bool foo(T)(T[] a ...) { return true; } void main() { assert(foo(1,1,1,1,1,1)); // OK assert(foo("abc")); // OK, T == immutable(char) assert(foo("abc","abc","abc","abc")); // NG, T should be deduced to string }
https://github.com/D-Programming-Language/dmd/pull/637
Commits pushed to https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/141b85fff1c7104dc2c64f48f0573ea7d50e7d29 fix Issue 7359 - Template function with typesafe variadic rejects more than one string arguments https://github.com/D-Programming-Language/dmd/commit/c9f0d0646ad3dde8a383f6f195763459e5d9a35b Merge pull request #637 from 9rnsr/fix7359 Issue 7359 - Template function with typesafe variadic rejects more than one string arguments
Looks as if this is safe to close now.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル