問題タブ [invalid-pointer]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
151 参照

c++ - 削除されたshared_ptrから生のポインタを使用する未定義の動作?

次のコードがあります

最後の 2 つのステートメントは安全ですか?

「10」を出力せずにhttp://cpp.sh/6pohを実行できますが、期待どおりですか? または単に未定義の動作ですか?