エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
reduce に cannot modify ... with immutable members って怒られる - Qiita
struct M { immutable int value; } auto f(M[] xs) { import std.algorithm : reduce; return xs.reduc... struct M { immutable int value; } auto f(M[] xs) { import std.algorithm : reduce; return xs.reduce!((x, y) => M(x.value + y.value)); } phobos\std\algorithm.d(763): Error: cannot modify struct result M with immutable members phobos\std\algorithm.d(784): Error: template instance reduce.f.reduce!((x, y) => M(x.value + y.value)).reduce!(M, M[]) error instantiating main.d(9): instantiated from here: re



2013/12/25 リンク