Rustとか言うダブスタ言語 (173レス)
Rustとか言うダブスタ言語 http://medaka.5ch.net/test/read.cgi/prog/1729120072/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
158: 仕様書無しさん [sage] 2024/10/22(火) 20:10:09.50 // MCopyトレイトを定義 pub trait MCopy { fn mcopy(&self) -> Self; } // プリミティブ型に対して一括実装 macro_rules! impl_mcopy { ($($t:ty),*) => { $( impl MCopy for $t { fn mcopy(&self) -> Self { *self } } )* } } // 全てのプリミティブ型に実装 impl_mcopy!( u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize, f32, f64, bool, char ); はい、もう何がしたいのか分からないけどプリミティブ型にmcopy実装したから好きにして。 これで読みやすくなる? http://medaka.5ch.net/test/read.cgi/prog/1729120072/158
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 15 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.010s