私は次のコードコンパイルしよう:dmd
とstd.algorithm.joiner(string []、string) - result要素がcharではなくdcharであるのはなぜですか?
import std.algorithm;
void main()
{
string[] x = ["ab", "cd", "ef"]; // 'string' is same as 'immutable(char)[]'
string space = " ";
char z = joiner(x, space).front(); // error
}
コンパイルがエラーで終了します。dchar z
からchar z
を変更
test.d(8): Error: cannot implicitly convert expression (joiner(x,space).front()) of type dchar to char
はエラーメッセージを修正し、それがに表示されますなぜ私が興味を持っています最初の場所。
なぜjoiner(string[],string).front()
の結果がdcharで、charではないのですか?
は