Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
なぜ次の行は
auto k = -10u;
戻り値 k = 4294967286 ? 10unsigned を符号付き整数に型キャストするべきではありませんか?
いいえ、そうすべきではありません。
-(unsigned type) は unsigned 型です。
組み込み整数に適用された演算子は、同じ型の結果を持ちます