Rustアンチスレ (202レス)
Rustアンチスレ http://mevius.5ch.net/test/read.cgi/tech/1509028624/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
79: デフォルトの名無しさん [sage] 2021/09/11(土) 13:59:42.94 ID:QGVH5OH8 発端と言ったらC#の方が古くね http://mevius.5ch.net/test/read.cgi/tech/1509028624/79
143: デフォルトの名無しさん [sage] 2022/05/23(月) 09:11:41.94 ID:n2ZPTBPD // ヒープを使う型Testを作って実証実験 #[derive(Debug)] struct Test(Box<isize>); // Test型が作成される時に使われるnew()を実装 impl Test { fn new(n: isize) -> Self { let new = Test(Box::new(n)); // その時にヒープで確保されたアドレスを表示 println!("{:p} = Test::new({n})", new.0); new } } // Test型の足し算を実装 impl std::ops::Add for Test { type Output = Self; fn add(self, rhs: Self) -> Self::Output { Test::new(*self.0 + *rhs.0) } } // 足し算の途中で使われる一時領域のアドレスはどうなるか? fn main() { let a = Test::new(1); let b = Test::new(10); let c = Test::new(100); let d = Test::new(1000); let e = Test::new(10000); println!("{:?}", a + b + c + d + e); } http://mevius.5ch.net/test/read.cgi/tech/1509028624/143
186: デフォルトの名無しさん [] 2023/08/11(金) 13:34:35.94 ID:v1edpQDw cargo publish して初めて出るエラー (cargo のあっち側の環境でコンパイルしてる) ってうざいよね http://mevius.5ch.net/test/read.cgi/tech/1509028624/186
196: デフォルトの名無しさん [] 2024/04/27(土) 21:26:16.94 ID:+PotGQRe crates.io が死ぬと詰むな・・・ http://mevius.5ch.net/test/read.cgi/tech/1509028624/196
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.713s*