4 ms·
C++ allows expressing that more concisely though :p https://twitter.com/Cor3ntin/status/1264600096869691392 https://twitter.com/Cor3ntin/status/1264600096869691
by jcelerier 6y ago
C++ allows expressing that more concisely though :p https://twitter.com/Cor3ntin/status/1264600096869691392 https://twitter.com/Cor3ntin/status/1264600096869691392
- staticassertion 6y agoThat's because it's using constexpr. The equivalent in Rust would be const fn. This is using Rust traits. The goal isn't to be concise, I think the goal is literally to just do it in the trait system