私はいくつかの D をコンパイルしようとしています。私が書いたコードは、std.stringライブラリとstd.algorithm. 私の関数の 1 つが文字列を呼び出しindexOfています: 残念ながら、どうやら にもindexOf関数がstd.algorithmあり、コンパイラはそれを好まない:
assembler.d(81): Error: std.algorithm.indexOf!("a == b", string, immutable(char)).indexOf at /usr/share/dmd/src/phobos/std/algorithm.d(4431) conflicts with std.string.indexOf!(char).indexOf at /usr/share/dmd/src/phobos/std/string.d(334)
assembler.d(81): Deprecation: function std.algorithm.indexOf!("a == b", string, immutable(char)).indexOf is deprecated
どうすればこれを回避できますか? C++ では、 を使用して、現在の::名前空間を明示的に指定できます... D はどうですか?