型推論
「型推論」を扱った22問。日付を開くと、その日のドリルがそのまま読めます。日付の横の動物は難易度で、ハリネズミ・孔雀・バイソン・クジラの順に重くなります。
- C++ / READ · 2026-11-18 autoで受けたビット vector<bool>, プロキシオブジェクト, auto の型推論, std::vector<bool>::reference, proxy object, auto deduction
- C++ / DEBUG · 2026-11-16 autoで退避した先頭 vector<bool>, auto, 型推論, 代理オブジェクト, 値の退避, 関数テンプレート, proxy reference, auto type deduction, vector<bool>::reference
- C++ / DEBUG · 2026-11-14 0で推論した補正の型 auto の型推論, 整数リテラル 0, double から int への変換, 切り捨て, Kahanの加算, auto deduction, floating-integral conversion, compensated summation
- Zig / DEBUG · 2026-11-13 要素の型で合計する @TypeOf, anytype, 合計のオーバーフロー, u8, 平均, illegal behavior, integer overflow, accumulator type
- C++ / READ · 2026-11-05 '0'+nとstd::max 整数昇格, 文字と数値の変換, テンプレート引数の推論, std::max, integer promotion, template argument deduction, char arithmetic
- Haskell / READ · 2026-11-01 同じ文字列を3通りに読む read, 型注釈, 型推論, 戻り値の型で決まる多相, Read型クラス, return type polymorphism, type annotation
- Haskell / DEBUG · 2026-11-01 保存した平均が読めない read, show, 型注釈, 型推論, 往復変換, no parse, round trip, Prelude.read
- Zig / READ · 2026-10-23 型を調べた呼び出しの回数 @TypeOf, @typeInfo, ピア型解決, 評価されない式, peer type resolution, no runtime side effects, type reflection
- C / WRITE · 2026-10-20 一度だけ評価するSWAP SWAPマクロ, C23 auto, 引数の多重評価, do while 0, swap macro, macro side effects, type inference
- C / READ · 2026-10-20 autoで受けた配列 C23 auto, 型推論, 配列からポインタへの変換, 構造体のコピー, type inference, array-to-pointer conversion, array decay
- C / DEBUG · 2026-10-20 0で始めた合計 C23 auto, 型推論, 複合代入の型変換, 小数部の切り捨て, 整数除算, type inference, implicit conversion, integer division
- C++ / READ · 2026-10-19 クローンを受け取る型 共変戻り値型, 仮想関数, 静的な型と動的な型, auto の型推論, covariant return type, static type, clone
- C++ / READ · 2026-10-11 静的バッファを返す関数 静的バッファ, 再入不可能な関数, auto の型推論, const char* と std::string, static buffer, non-reentrant function, auto type deduction
- C++ / DEBUG · 2026-10-04 CSVの引用符が付かない decltypeと参照, std::remove_cvref_t, if constexpr, std::is_same_v, decltype of reference parameter, CSV quoting
- C++ / WRITE · 2026-10-03 先頭と等しい値を消す std::eraseと参照, auto{x}, 値のコピー, decay-copy, std::erase with element reference, auto(x) prvalue copy
- C++ / READ · 2026-10-03 autoと波括弧とvector auto x = {3}, auto y{3}, initializer_listの推論, vectorの丸括弧と波括弧, auto deduction from braced-init-list, std::initializer_list constructor
- C++ / DEBUG · 2026-10-03 連番のポートを返す initializer_listを返す, 背後の配列の寿命, auto x = {}, dangling initializer_list, backing array lifetime
- C++ / READ · 2026-09-09 範囲forのautoに代入 範囲for文, auto, vector<bool>, プロキシオブジェクト, コピーと参照, range-based for, proxy reference
- C / WRITE · 2026-09-05 型変数の出現検査 出現検査, 単一化, 型変数, 再帰, occurs check, unification, type variable, recursion
- C / READ · 2026-09-05 失敗した単一化の後始末 単一化, 型推論, 型変数の束縛, 失敗時の巻き戻し, Hindley-Milner, unification, type variable binding, backtracking
- C / DEBUG · 2026-09-05 一段だけたどる束縛 単一化, 型変数の束縛, 代表元をたどる, 型推論, unification, find, binding chain, Hindley-Milner
- C++ / WRITE · 2026-08-26 型ごとに文字列へ変える std::visit, std::variant, std::monostate, overloadedパターン, ラムダの戻り値型, visitor, return type deduction