2 hours ago · Tech · hide · 0 comments

Almost two years ago now, I wrote the post Rust Attributes vs C++ Annotations. That post, I walked through how in standard C++26 we could get this code: struct [[=derive<Debug>]] Point { int x; int y; }; To have similar behavior and effect to this standard Rust code: #[derive(Debug)] struct Point { x: i32, y: i32, } Note that the actual spelling of the attribute a...

No comments yet. Log in to reply on the Fediverse. Comments will appear here.