>>50
"Copyのコストが高い" は Copy を実装する行為そのもののコストが高いと解釈すべきということ?
そんなばかな
>>52
ドキュメント読みましょうねー
https://doc.rust-lang.org/stable/std/marker/trait.Copy.html
> It’s important to note that in these two examples, the only difference is whether you are allowed to access x after the assignment.
> Under the hood, both a copy and a move can result in bits being copied in memory, although this is sometimes optimized away.
...
> The behavior of Copy is not overloadable; it is always a simple bit-wise copy.
...
> The implementation of Clone can provide any type-specific behavior necessary to duplicate values safely.
> For example, the implementation of Clone for String needs to copy the pointed-to string buffer in the heap.
探検
Rust part15
■ このスレッドは過去ログ倉庫に格納されています
2022/05/16(月) 20:58:36.88ID:qW5+0T97
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 【地震速報】青森県で震度6強 沿岸部に津波警報 ★6 [ぐれ★]
- 「日の丸にバツ印」掲げた大学生 あいまいな国旗損壊罪に「怖い」 The Mainichi [少考さん★]
- 高市内閣「支持」64%「不支持」19% NHK世論調査 ★2 [少考さん★]
- 【音楽】BARBEE BOYS・KONTAが事故で四肢麻痺を公表、新体制で活動は継続 [少考さん★]
- 高市首相「多様なコメの増産を進める」 方針転換への懸念払拭狙いか ★2 [どどん★]
- 中国「捜索レーダー起動は各国の通常の手法」 火器管制用か回答せず [蚤の市★]
- 🖐( -᷄ὢ)俺様が寝るぞ……
- ぺこーら、地震で同僚が次々配信を止めるなか強行し続けるので悪目立ちするwww [268244553]
- 初めて顔パックしたけど凄いなこれ
- 巨大地震 [957955821]
- 千晴の住所教えてよ!
- 【🏡】岩手ビックウェーブ🏄うおおおおおおおおおおお🌊
