3 ms·
Rust has some precedence for adding convenience newtypes with overloaded operators (eg. `Wrapping<I>´ for `I.wrapping_add(I)` etc). Such a wrapper isn't current
by Sharlin 1y ago
Rust has some precedence for adding convenience newtypes with overloaded operators (eg. `Wrapping<I>´ for `I.wrapping_add(I)` etc). Such a wrapper isn't currently proposed AFAIK but there's no reason one couldn't be added in the future I believe.
- eqvinox 1y agoRight, as long as the LLVM intrinsics are exposed you could just put that in a crate somewhere.
- Measter 1y agoFor giggles, here's one I whipped up, along with an example use: https://godbolt.org/z/Eezj35dzc https://godbolt.org/z/Eezj35dzc
- Sharlin 1y agoWow, that's some hardcore unrolling.
- eqvinox 1y agoHaving done unspeakable things with the C preprocessor myself, this Rust macro soup truly warms my heart <3
- Measter 1y agoOh this is simple, this is just a bit of basic expansion to generate boilerplate. The real experts can do some gnarly and amazing stuff with macros.